SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] new interface functions for LinearSegmentedColormap

From: Dr. P. M. F. <pfe...@ve...> - 2009年09月29日 15:32:45
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 submitting this in the hopes that this
functionality will be incorporated into matplotlib.
There's one thing that I've not been able to resolve: When attempting to
display all defined colormaps using colormaps_test.py (attached), colormaps
that I've defined do not show up. So, it would appear that registering a
colormap makes it possible to access that colormap only if the name is known
to the program that wants to use it.
http://www.nabble.com/file/p25665294/make_cmap.py make_cmap.py 
http://www.nabble.com/file/p25665294/colormaps_test.py colormaps_test.py 
-- 
View this message in context: http://www.nabble.com/new-interface-functions-for-LinearSegmentedColormap-tp25665294p25665294.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /