Dear all,
I find I would like to make some change from the existing colormaps. for
example, I would like to change the color at the beginning of the colormap
(let's say mat.cm.jet) but I still
want to use the remaining other colors. So is there way I can easily use
some functions already in matplotlib to extract the colorlist and levels
from a mat.cm.jet?
Then I can just change the first color of the colorlist, and use
mat.colors.LinearSegmentedColormap.from_list to easily construct the
colormap I want.
I can use mat.cm.jet._segmentdata to retrieve the dictionary. I also have a
look at the source code
/usr/local/lib/python2.7/dist-packages/matplotlib/colors.py but I didn't
manage to find a solution.
both mat.colors.LinearSegmentedColormap and mat.colors.ListedColormap
finally calls mat.colors.Colormap.__init__ and then I don't understand how
these colorlist are really used for plotting.
Another question, where can I find the source code where mat.cm.jet is
defined?
thanks et cheers,
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users