## [Matplotlib-users] Colormap range and data values

 [Matplotlib-users] Colormap range and data values From: antonv - 2009-01-05 18:42:12 ```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: cmap= mpl.cm.jet 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? Thanks, Anton -- View this message in context: http://www.nabble.com/Colormap-range-and-data-values-tp21296666p21296666.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```

 [Matplotlib-users] Colormap range and data values From: antonv - 2009-01-05 18:42:12 ```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: cmap= mpl.cm.jet 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? Thanks, Anton -- View this message in context: http://www.nabble.com/Colormap-range-and-data-values-tp21296666p21296666.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```