Hi all,

I was made aware of this thread and thought I’d share a notebook I recently 
made for a similar purpose:

http://nbviewer.ipython.org/gist/krischer/d35096a9d3b6da5846a5 
<http://nbviewer.ipython.org/gist/krischer/d35096a9d3b6da5846a5> (takes a while 
to load…)

It attempts to “optimize" colormaps by defining optimality as having a linear 
lightness across the colormap in LAB color space. It is very simple and not a 
proper optimization procedure. It just goes to LAB space, sets the lightness to 
the target lightness, and goes back to sRGB space. This does not always work as 
the LAB color space is much bigger than the RGB one but in many cases it 
produces fairly good results.

The nice thing about this is that the lightness range can be chosen so it is 
does not always have to be stark white or black at the ends and some hue can be 
preserved.

I am not sure if some similar functionality is useful to include into 
matplotlib (I don’t really think so) but if yes, let me know and I’ll give it a 
try. I guess it could also be extended to optimize towards monotonic changes in 
hue.

Cheers and all the best!

Lion

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to