[SciPy-user] [*] Re: Restricting the values to be plotted while usingcontourf
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.
>> -----Original Message-----
>> From: firstname.lastname@example.org
>> [mailto:email@example.com] 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
>> 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.
>> Mani chandra
>> SciPy-user mailing list
> SciPy-user mailing list
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