I'd like to see a single function that combines ListedColormap and 
BoundaryNorm.  This function could compare the lengths of the color list 
and threshold list to determine what type of colormap is desired.  (If 
the lengths are the same, then the calling program wants a continuous 
colormap; if there is one more color than boundaries, the calling 
program wants a discrete colormap).  If this function had optional 
arguments to specify the `under` and `over` colors, that would be even 
better.

Phillip

Phillip M. Feldman wrote:
> Eric and Reinier-
>
> It seems to me that continuous (piecewise-linear) colormaps could work 
> in much the same fashion.  One would specify n boundary colors and n 
> thresholds (for continuous colormaps, I believe that the number of 
> thresholds and colors must be the same), and for any value between two 
> thresholds, the colors associated with the bounding thresholds would 
> be automatically interpolated.  What do you think?
>
> Phillip
>
> Eric Firing wrote:
>> What does allow you to specify the transitions exactly (to within the 
>> limits of double precision) is this:
>>
>> cmap = ListedColormap(['r','g','b'])
>> norm = BoundaryNorm([1.5+1.0/3, 1.5+2.0/3], cmap.N)
>
>


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) 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/devconference
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to