Colormap range and data values

Hi all,

I have an issue with the colormap for my plots. The data I'm plotting ranges
between 0 and 24 but I am trying to have the colormap display values from 0
to 30. What happens is that the colormap reads the min and max values in my
data and uses those disregarding the vmin and vmax set.

Here is a snippet of code to show how I'm using the colormap:

norm= mpl.colors.Normalize(vmin=0,vmax=30)
m.contourf(X,Y, zi, cmap = cmap, norm = norm)

Another question is how can you setup the levels displyed in the colormap.
In my previous example they are st at 0,3,6,9,12,...24. How can I make them
every 2 values or every 1 value?



View this message in context:
Sent from the matplotlib - users mailing list archive at