How can I make a custom divergent colormap in Sage?
What I want is the same than the reverse seismic
divergend colormap (Divergend Colormaps) but the blue value schould be less intensiv (e. g. conflower blue [Hex color code: #6495ED]).
In the sage source code I found the following link Divergend Colormaps, which explains the divergent colormaps and has a python class in the attachments. But still I have no clue to make such a divergent colormap.
I have also tryed to make it with a LinearSegementedColormap:
from pylab import *
startcolor = '#FF0000'
midcolor = '#FFFFFF'
endcolor = '#0030CC'
own_cmap1 = matplotlib.colors.LinearSegmentedColormap.from_list( 'own2', [startcolor, midcolor, endcolor] )
matrix_plot( matrix( [ [1,3,5,1], [2,4,5,6], [1,-3,5,7] ] ), cmap = own_cmap1, colorbar = True )
but the result is absolutely not what I want, because it goes to fast from red into pink.