After experimenting with colormaps for a while, I was able to make both
discrete (piecewise-constant) and continuous (piecewise-linear) colormaps
work. Although colormaps can be created directly using
LinearSegmentedColormap from the matplotlib.colors package, this is a
tedious and error-prone process. So, I compiled a set of three interface
functions. (I wrote two of these myself, and got one from the SciPy
website). The two functions that I wrote permit one to define a discrete
(piecewise-constant) and continuous (piecewise-linear) colormap directly via
a sequence of colors and a set of thresholds specified as lists. Each color
may be specified either via an RGB tuple or via an English color name known
to webcolors.name_to_rgb. I'm going to submit all of this to the matplotlib
developers forums in the hopes of getting it incorporated into matplotlib.
-- 
View this message in context: 
http://www.nabble.com/new-interface-functions-for-LinearSegmentedColormap-tp25657187p25657187.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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