Text of discourse.matplotlib.org › t › matplotlibs-new-default-colormap › 18959 as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Matplotlib's new default colormap - matplotlib-devel - Matplotlib

Matplotlib's new default colormap Development matplotlib-devel Phil_Elson November 21, 2014, 5:32pm 1 Please use this thread to discuss the best choice for a new default matplotlib colormap. This follows on from a discussion on the matplotlib-devel mailing list entitled “How to move beyond JET as the default matplotlib colormap”. It is accepted that there can never be a best colormap for all data, so some documentation on choosing an appropriate colormap for specific data should always be sought.

Nonetheless, matplotlib does need a default, and it has been shown just how damaging the Jet (matplotlib’s current default) colormap really is, so we need to come up with a genuine alternative. To keep this thread as useful as possible please avoid posting “+1” type messages. If you’d like to suggest a colormap for consideration as matplotlib’s new default please try to keep to reference-able/demonstrable fact.

Thanks, Phil _Darren_Dale2 November 21, 2014, 5:46pm 2 I remember reading a (peer-reviewed, I think) article about how "jet" was a very unfortunate choice of default. I can't find the exact article now, but I did find some other useful ones: http://cresspahl.blogspot.com/2012/03/expanded-control-of-octaves-colormap.html http://www.sandia.gov/~kmorel/documents/ColorMaps/ http://www.sandia.gov/~kmorel/documents/ColorMaps/ColorMapsExpanded.pdf Darren ··· On Fri, Nov 21, 2014 at 12:32 PM, Phil Elson < [email protected] ...> wrote: Please use this thread to discuss the best choice for a new *default* matplotlib colormap.

This follows on from a discussion on the matplotlib-devel mailing list entitled "How to move beyond JET as the default matplotlib colormap". Nathaniel_Smith November 21, 2014, 9:42pm 3 Those are good articles. There's a lot of literature on the problems with "jet", and lots of links in the matplotlib issue [1]. For those trying to get up to speed quickly, MathWorks recently put together a nice review of the literature [2].

One particularly striking paper they cite studied a group of medical students and found that (a) they were used to/practiced at using jet, (b) when given a choice of colormaps they said that they preferred jet, (c) they nonetheless made more *medical diagnostic errors* when using jet than with better designed colormaps (Borkin et al, 2011). I won't suggest a specific colormap, but I do propose that whatever we chose satisfy the following criteria: - it should be a sequential colormap, because diverging colormaps are really misleading unless you know where the "center" of the data is, and for a default colormap we generally won't. - it should be perceptually uniform, i.e., human subjective judgements of how far apart nearby colors are should correspond as linearly as possible to the difference between the numerical values they represent, at least locally.

There's lots of research on how to measure perceptual distance -- a colleague and I happen to have recently implemented a state-of-the-art model of this for another project, in case anyone wants to play with it [3], or just using good-old-L*a*b* is a reasonable quick-and-dirty approximation. - it should have a perceptually uniform luminance ramp, i.e. if you convert to greyscale it should still be uniform. This is useful both in practical terms (greyscale printers are still a thing!) and because luminance is a very strong and natural cue to magnitude. - it should also have some kind of variation in hue, because hue variation is a really helpful additional cue to perception, having two cues is better than one, and there's no reason not to do it. - the hue variation should be chosen to produce reasonable results even for viewers with the more common types of colorblindness. (Which rules out things like red-to-green.) And, for bonus points, it would be nice to choose a hue ramp that still works if you throw away the luminance variation, because then we could use the version with varying luminance for 2d plots, and the version with just hue variation for 3d plots. (In 3d plots you really want to reserve the luminance channel for lighting/shading, because your brain is *really* good at extracting 3d shape from luminance variation.

If the 3d surface itself has massively varying luminance then this screws up the ability to see shape.) Do these seem like good requirements? -n [1] Replace "jet" as the default colormap · Issue #875 · matplotlib/matplotlib · GitHub [2] Rainbow Color Map Critiques: An Overview and Annotated Bibliography - MATLAB & Simulink [3] GitHub - njsmith/pycam02ucs: (Don't use this - use njsmith/colorspacious or matplotlib/viscm or both) ; install (or just run out of the source tree) and then use pycam02ucs.deltaEp_sRGB to compute the perceptual distance between two RGB colors.

It's also possible to use the underlying color model stuff to do things like generate colors with evenly spaced luminance and hues, or draw 3d plots of the shape of the human color space. It's pretty fun to play with ··· On Fri, Nov 21, 2014 at 5:46 PM, Darren Dale < [email protected] ...> wrote: On Fri, Nov 21, 2014 at 12:32 PM, Phil Elson < [email protected] ...> wrote: Please use this thread to discuss the best choice for a new default matplotlib colormap.

This follows on from a discussion on the matplotlib-devel mailing list entitled "How to move beyond JET as the default matplotlib colormap". I remember reading a (peer-reviewed, I think) article about how "jet" was a very unfortunate choice of default. I can't find the exact article now, but I did find some other useful ones: http://cresspahl.blogspot.com/2012/03/expanded-control-of-octaves-colormap.html http://www.sandia.gov/~kmorel/documents/ColorMaps/ http://www.sandia.gov/~kmorel/documents/ColorMaps/ColorMapsExpanded.pdf -- Nathaniel J.

Smith Postdoctoral researcher - Informatics - University of Edinburgh Eric_Firing2 November 21, 2014, 10:53pm 4 Please use this thread to discuss the best choice for a new default matplotlib colormap. This follows on from a discussion on the matplotlib-devel mailing list entitled "How to move beyond JET as the default matplotlib colormap". I remember reading a (peer-reviewed, I think) article about how "jet" was a very unfortunate choice of default.

I can't find the exact article now, but I did find some other useful ones: http://cresspahl.blogspot.com/2012/03/expanded-control-of-octaves-colormap.html http://www.sandia.gov/~kmorel/documents/ColorMaps/ http://www.sandia.gov/~kmorel/documents/ColorMaps/ColorMapsExpanded.pdf Those are good articles. There's a lot of literature on the problems with "jet", and lots of links in the matplotlib issue [1]. For those trying to get up to speed quickly, MathWorks recently put together a nice review of the literature [2].

One particularly striking paper they cite studied a group of medical students and found that (a) they were used to/practiced at using jet, (b) when given a choice of colormaps they said that they preferred jet, (c) they nonetheless made more *medical diagnostic errors* when using jet than with better designed colormaps (Borkin et al, 2011). I won't suggest a specific colormap, but I do propose that whatever we chose satisfy the following criteria: - it should be a sequential colormap, because diverging colormaps are really misleading unless you know where the "center" of the data is, and for a default colormap we generally won't. - it should be perceptually uniform, i.e., human subjective judgements of how far apart nearby colors are should correspond as linearly as possible to the difference between the numerical values they represent, at least locally.

There's lots of research on how to measure perceptual distance -- a colleague and I happen to have recently implemented a state-of-the-art model of this for another project, in case anyone wants to play with it [3], or just using good-old-L*a*b* is a reasonable quick-and-dirty approximation. - it should have a perceptually uniform luminance ramp, i.e. if you convert

The rest of this page is on the live site.