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 done correctly, it's just that the colorbar should show the
original, and not the rescaled values.

Thanks,
-Niko


I did not try vmin and vmax, because
On 04/26/2010 02:31 PM, Jae-Joon Lee wrote:
> 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 problem with imshow is, that it rescales the data so the
>> colorbar does not show the correct amplitudes (see
>> www.rath.org/imshow.png):
>>
>>    ctr = ax.imshow(omega, cmap=cm.YlOrRd, aspect='equal', 
>> interpolation='nearest',
>>                    origin='lower', extent=(-(N-1)/2, (N-1)/2, 0, M-1))
>>    fig.colorbar(ctr)
>>    ax.set_xlim(xmin= -(N - 1) / 2, xmax=(N - 1) / 2)
>>    ax.set_ylim(ymin=0, ymax=M - 1)
>>    fig.show()
>>
>> Is there a way to get the proper amplitudes into the colorbar?


   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to