Hello,
I have 2d array with fourier amplitudes that I would like to plot. I
found two options: contourf and imshow. This is my code:
omega = np.fft.rfftn(b_field, axes=(1, 0))
omega = np.abs(np.fft.fftshift(omega, axes=(1,)))
fig = plt.figure()
ax = fig.add_subplot(111)
M =
Did you try to change vmin, vmax?
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.imshow
If this is not what you want, please describe more explicitly why the
colorbar is wrong.
Regards,
-JJ
On Mon, Apr 26, 2010 at 11:37 AM, Nikolaus Rath nikol...@rath.org wrote:
The
Hi,
I want the colorbar to show the real fourier amplitudes, not the
amplitudes after rescaling to 0..1. In other words: the colorbar created
by imshow should have the same values as the one created by contourf.
I am not sure how I can use vmin and vmax to achieve that effect. The
scaling is
I think I'm lost.
In other words: the colorbar created
by imshow should have the same values as the one created by contourf.
But, in your original post, your plotting two different image.
with contourf, you're drawing omega*1, but with imshow, you're
drawing omega.
Are you saying that
Hi,
Believe it or not, the factor of 1 was my only problem all the time.
Until you pointed it out I never noticed that it was missing in one of
the calls.
Thanks!
Niko
On 04/26/2010 03:26 PM, Jae-Joon Lee wrote:
I think I'm lost.
In other words: the colorbar created
by imshow