On Thu, Sep 22, 2011 at 5:16 PM, Nathaniel Smith <njs@pobox.com> wrote:

On Sep 21, 2011 5:29 PM, "Christoph Gohlke" <cgohlke@uci.edu> wrote:
> On 9/13/2011 12:24 AM, Eric Firing wrote:
> > On 07/18/2011 07:07 AM, Sameer Grover wrote:
> >> I came across this website where different colormaps have been compared
> >> and the author has come up with an optimal colormap for data
> >> visualization called the "cool-warm colormap".
> >>
> >> http://www.cs.unm.edu/~kmorel/documents/ColorMaps/index.html
> >>
> >> It is somewhat similar to the cool colormap already included in
> >> matplotlib, but I've added the new colormap to matplotlib in the patch
> >> attached in case it is deemed fit to be included in the matplotlib source.
> > We should include this, but I think the 257-entry version is overkill;
> > it adds a big chunk to the _cm.py file, and I doubt it is visually
> > distinguishable from the 33-entry version.  Would you mind providing a
> > patch for the latter?  (Or better yet, the functions that generate the
> > r,g,b values.)
> Here's a pull request for the 33 entry map:
> <https://github.com/matplotlib/matplotlib/pull/486>

Let me open a can of worms here...

I looked at the paper, and the goal was specifically to produce a good "default" colormap - not necessarily the best for any situation, but good overall and certainly better than the rainbow ('jet') colormap in most cases. (I agree with the author that jet is pretty terrible and tends to distort data.)

Should we switch to this as the default matplotlib colormap? I think it would be a clear improvement.

I have absolutely no clout here, but I'd definitely be in favor of changing the default colormap away from "jet".

Personally, I'd prefer a two-tone colormap as the default (two-distinct tones at the limits with a gradient in-between---dubbed "sequential" in the paper) instead of a three-tone colormap (three-distinct tones---dubbed "diverging" in the paper). (I think this is a more common use case, and I think using a "diverging" colormap effectively requires setting vmin/vmax.) But really, (almost) anything is better than "jet".

Don't misunderstand: I know I can change the default colormap in my matplotlibrc file (and this is what I do). But 90% of people don't bother to change the defaults. If changing this default in matplotlib prevents just 1 person from publishing a paper with a "jet" colormap, I think we'll have made the world a better place. ;)