From: Gary R. <gr...@bi...> - 2009-08-12 23:02:25
|
I think this would be useful. While you're at it, in the attached file I have a function "rescale_cmap" that effectively changes the autoscaling of the colormap to the data by allowing specification of the range limits - I find this useful. You might like to look at this to see if it's worth generalising your additions a little, Gary Reinier Heeres wrote: > Hi all, > > I would like to propose the attached patch to be able to use a gamma > value for color maps. This will make it simple to make your color > scale more 'sensitive' at the bottom or at the top, as can be seen in > the attached example. This could in principle also be solved by adding > a gamma normalizer, but I think that applying it to a color map is > quite coming practice, so in this case the preferred way. > > I'd also like to add a few extra color maps (at least one plain > blue-white-red and one with darker shades at the high and low ends, as > in the attachment). I also remember a particular one ('terrain') in a > measurement program called 'Igor' that would be nice. > > Looking at _cm.py, I would guess that could be done a bit more > efficient than the current 5880 lines as well by just specifying a few > colors and using LinearSegmentedColormap.from_list(). Is it ok if I > try to refactor that? > > Let me know what you think. > > Cheers, |