
How Bad Is Your Colormap? (2014) - kristianp
https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/
======
hprotagonist
I highly recommend this accompanying video, which takes jake's idea and goes
into the details of how viridis replaced the ever-naughty Jet.

Colormap selection is surprisingly fascinating.

"A Better Default Colormap for Matplotlib (SciPy 2015) Nathaniel Smith and
Stéfan van der Walt"
[https://www.youtube.com/watch?v=xAoljeRJ3lU](https://www.youtube.com/watch?v=xAoljeRJ3lU)

~~~
jey
Related: [https://bids.github.io/colormap/](https://bids.github.io/colormap/)

------
oasisbob
Are there any articles out there that give advice on choosing/adjusting color
maps for a particular situation?

I understand why some maps are awful, but have had a hard time finding a color
map which I like perceptually for interpreting LIDAR forest canopy maps.

I've tried using viridis and a few others, but exceptionally tall trees get
lost in the noise (not enough contrast), especially when using transparency to
overlay canopy height on the LIDAR intensity data.

Is this just a case of not clamping the ends of the range properly?

~~~
semi-extrinsic
I guess if your underlying data is not uniform, a uniform color map isn't
going to do great?

Say, if you have a bimodal underlying distribution and you're interested in
coloring according to quantiles, you want to have a similarly bimodally
distributed color map.

The easiest way to achieve this is to compute the quantiles for your data set,
and color by that (rather than height).

------
forgetJet
Not enough people know about rainbow colormaps being problematic. This is a
pretty cool tool that scans bioRxiv for preprints that use Jet and then
automatically sends the authors an email asking them to improve the colormap,
e.g. to viridis, parula.

[https://jetfighter.ecrlife.org](https://jetfighter.ecrlife.org)

------
DoreenMichele
The piece makes some good points about problems with converting certain color
schemes to grayscale. This is a not insignificant thing. It is quite common to
print charts and graphs in grayscale, either because the only available
printer is black and white or because color printing is substantially more
expensive.

~~~
jacobolus
That’s not the point.

Everyone’s eyes/brain interpret colors by taking signals from the 3 types of
cone cell detectors and combining them into 2 color-difference signals
(red–green and blue–yellow) and 1 brightness signal. The latter of these has
the best spatial/temporal resolution and is used for interpreting
textures/fine details, edges of shapes, motion, depth, etc.

In a sense, everyone’s vision is primarily grayscale, with lower-resolution
color information layered over the top.

~~~
ComputerGuru
And then you have to take into account that our sensitivity to some colors
then others. Our cones are tuned to what can be approximated as three
different bands of wavelength, which are centered in and sufficiently overlap
around the green wavelength to result in our being most able to discern the
color. Human eyes can discern at least twice as many distinct shades of green
than they can red or blue in a uniform distribution, and color science has to
take that into account to prevent such an image from appearing overwhelmingly
green.

------
whatshisface
One area where I would like to see more perception research is in 2D colormaps
for values that have both an angle and a magnitude (complex numbers). The
"state of the art" seems to be throwing it all into max-saturation HSV but I
know we can do a lot better than that.

------
neilpanchal
I wrote a Processing library [1] that allows you to select perceptually inform
colors in any range (but remember there are holes where normal sRGB monitors
cannot fill, see the API docs [2]). If you haven’t heard of Processing, check
it out! [3]; it is a generative graphics tool with an Arduino-like interface
and IDE.

[1]
[https://github.com/neilpanchal/Chroma](https://github.com/neilpanchal/Chroma)

[2]
[https://github.com/neilpanchal/Chroma/blob/master/README.md](https://github.com/neilpanchal/Chroma/blob/master/README.md)

[3] [https://processing.org/](https://processing.org/)

------
knolan
Matlab (somewhat) recently ditched jet as the default colourmap in favour of
Parula.

[https://blogs.mathworks.com/steve/2014/10/13/a-new-
colormap-...](https://blogs.mathworks.com/steve/2014/10/13/a-new-colormap-for-
matlab-part-1-introduction/)

Since most folks (typically students) simply use the default this should help
end the tyranny of jet.

I do still like jet for on screen visualisation, the extra contrast can be
useful.

~~~
bobbylarrybobby
Isn’t the whole point that the contrast is factually incorrect? It looks
pretty but is a lie.

~~~
knolan
Indeed, but when you’re looking at small variations in a gradient it’s a
reasonable tool to use before you delve deeper.

------
chaosbutters314
I do CFD and have really begun experimenting with various colormaps for each
project and it has made a significant business impact.

Each color map has a specific type of story it is best at telling and using
program defaults is a really bad practice. For the type of phenomena you are
trying to highlight and explain there is a color map for that problem and I
think this is something that is understudied and under discussed for its
impact

~~~
kardos
You might like this colourmap set then:
[https://matplotlib.org/cmocean/](https://matplotlib.org/cmocean/)

------
dearrifling
About that _luminance-correct_ grayscale:
[https://entropymine.com/imageworsener/grayscale/](https://entropymine.com/imageworsener/grayscale/)

------
sidcool
Can we tag this with [2014]?

