[SciPy-user] [*] Re: Restricting the values to be plotted while usingcontourf

Mani chandra mchandra@iitk.ac...
Mon May 4 12:11:04 CDT 2009


Whitcomb, Mr. Tim wrote:
> We did this by creating a new instance of matplotlib.colors.Normalize
> that restricted the range: something like
> contourf(X, Y, Z, norm=matplotlib.colors(Normalize(vmin=0, vmax=100)).
> Adding extend='both' in the contourf helped as well, eliminating the
> out-of-range white spots.
>
> I would be very interested if there is a better/more standard way of
> doing this.
>
> Tim
>
>   
>> -----Original Message-----
>> From: scipy-user-bounces@scipy.org 
>> [mailto:scipy-user-bounces@scipy.org] On Behalf Of Mani chandra
>> Sent: Monday, May 04, 2009 7:27
>> To: SciPy Users List
>> Subject: [SciPy-user] Restricting the values to be plotted 
>> while usingcontourf
>>
>> Hi,
>>
>>     How can I restrict the values of 'z' while using 
>> contourf. For example, if my dataset has values of z ranging 
>> from say 0 to 10000, I only want the plot of those values of 
>> 'z' from 0 to 100 and appropriately set the colormap.
>>
>> Thanks
>> Mani chandra
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>     
> _______________________________________________
> SciPy-user mailing list
> SciPy-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>   
Hi,

    Your method does not seem to work. I keep getting the following error:
   
contourf(A, B, z, 100, extend='both', 
norm=matplotlib.colors(Normalize(vmin=0, vmax=100) ) )
TypeError: 'module' object is not callable




More information about the SciPy-user mailing list