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?
How does this differ from LinearSegmentedColormap.from_list()? I guess what you are getting at is the quantization problem I mentioned in connection with discrete colormaps. But it is not a problem when the colors are linearly interpolated--that is, smoothly varying from one end of the map to the other. It is only a problem when there are jumps. Eric > > 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