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

Whitcomb, Mr. Tim tim.whitcomb@nrlmry.navy....
Mon May 4 10:50:34 CDT 2009


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
> 


More information about the SciPy-user mailing list