Dr. Phillip M. Feldman wrote:
> The attached script creates a colormap containing five colors. At the end of
> the script, I print the value of cmap.N, and it is 256 rather than 5.
> 
> http://www.nabble.com/file/p25740788/bugdemo.py bugdemo.py 

No, it is not a bug.  You never told LinearSegmentedColormap that you 
wanted a map with other than 256 colors, which is the default.  If you 
want a colormap with 3 colors, use a ListedColormap.  In fact, as I 
wrote before, this, together with a BoundaryNorm, is the best way to 
handle the mapping of discrete colors.

Eric

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to