def showLog(im, cmap='jet'): "Displays log of the real image with correct colorbar." f = plt.figure(); i = plt.imshow(im, norm=col.LogNorm(), cmap=cmap) f.colorbar(i) return f,i