Rainbow Color Map Still Considered Harmful (2007) [pdf]
raw.githubusercontent.com
raw.githubusercontent.com
The techniques employed harm the rainbow gradients significantly, making them far less smooth than they would be with better interpolation, even with the same colour stops. On that point, the first row of that diagram feels more like a straw man than an honest comparison—it shows massive and uneven colour bands which I don’t think is entirely artefacts of the gradient interpolation.
I will admit that users of rainbow colour maps are more likely to interpolate poorly and not space colours evenly, but still, I wish the article had done as good a job as possible on the rainbow colour map, to show that even then it’s still problematic.
How about: I want to maximize the number of distinctions between values that are possible via comparisons of colors. Something that takes a long path through colorspace is best for this. Short simple paths do better enable making ordinal judgements between values (which the authors care a lot about), but they're not as good for maximizing distinctions.
Were data vis a more conceptually mature discipline, we wouldn't rely on this kind of simple prescriptive guidance.
Maybe the difference is not 'conceptual' but some atavic or cultural reaction?
Because it's the default for a lot of matplotlib visualizations. Per Goethe: "Misunderstandings and lethargy perhaps produce more wrong in the world than deceit and malice do."
https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-co...
The link above goes over some interesting plots that have very misleading color gradients.
Not all visual things are simple, and not all simple visual things are effective for their intended purpose.
If non-monotonic luminance variations are an acceptable cost for a colormap that otherwise offers superior discriminability, than that's a colormap that someone may have a good reason to choose.
In what kind of plots do you think maximum discriminability, at the cost of discriminating things that don't exist, is more important than linearity?
As a comparison, what would you rather have: a non-distorted plot or a plot that is on average about three times as big, but it's heavily distorted. At some places it's smaller than the original and on other places it's 5 times bigger. Would you really choose the bigger figure? That is what jet is.
Look at this plot https://youtu.be/xAoljeRJ3lU?t=791 (watch the whole video if you have the time), ideally you want the derivatives (the 2 plots on the left top) to be constant so not to distort your data. Jet is all over the place while viridis is basically constant (not shown in the slides, but the derivative stays all the way around 120).
Our different levels of certainty and conviction may arise from my being a data vis academic, rather than a tool user or tool builder.
Rainbow colormaps show banding, which is great when you want to have an idea of contour shapes. For example, the most common rainbow colormap, "jet" is great at showing jet engine exhaust plumes, hence the name. But if the value matter more than the shape, then it is terrible. The same banding that highlight shapes create artificial discontinuities in otherwise smooth data.
Maybe it is like the Comic Sans of color maps. It serves a purpose. In the case of Comic Sans, it was made to give a comic font to the comic characters of Microsoft Bob. And people liked it and used it everywhere, much to the dismay of typographers. "Jet" serves a purpose, but people misuse it because it looks cool.
If you want to see bands I think you're better served by just digitizing the value into, say, 10 ranges, and color each range in uniform color, like how they did it in old-school paper maps.
Magma/plasma/inferno are nice too.
https://cran.r-project.org/web/packages/viridis/vignettes/in...
Here's plenty of other people advocating for viridis as well:
https://stats.stackexchange.com/questions/223315/why-use-col...
https://medvis.org/2016/02/23/better-than-the-rainbow-the-ma...
Use viridis.
But, all of it lives within a one-size-fits-all mentality that more experienced users will be annoyed with (who made you the expert to know that viridis was best for my problem?).
And, it decreases the chances that new users will appreciate that this is a domain (whether it be how to code with JS, or what language to pick, or how to do numeric computations) in which the path you take depends on the where you want to go, and there are lots of places to go. Colormap choice depends on the questions you want the visualization to help answer about your data.
So, implied by "use viridis", or any ther one-size-fits-all advice, is either "you are simple", "your needs are simple", or "this domain is simple", which implies a lot more hubris than was probably intended.
I guess I don't understand your take here.
No, Viridis is not strictly better. You are assuming a particular (simple) tasks, i.e., what is the question about the data that you want the visualization to help answer.
Here is a task for which Viridis is not strictly better: show me (1) all places in the data where there the gradient magnitude exceeds some small threshold, while also permitting (2) some appreciation of the over-all form of things.
What these requirements ask of the colormap, considered as a path through perceptual colorspace, respectively: (1) always have a high velocity, and be as long a path as possible, while (2) not overlapping on itself in an ambiguous way.
The "rainbow" colormap is better at (1) than Viridis because it is simply a longer path through colorspace. It gets that extra length in part by not caring about being monotonic in luminance. If (2) was the only thing that mattered, Viridis might be better, but for lots of technical settings, the over-all form of things are already known, and it is the small fluctuations that are interesting to show, so "rainbow" can be better.
Now, you could take things to an extreme and say, okay, if (1) is the task, than here's your colormap: a high-frequency sinusoid. Then the visualization is essentially a huge mess of isocontours. Which is terrible for (2). But "rainbow" is more legible than that, and is going to be better than Viridis for some weightings of (1) and (2).
My points are: - blanket statements like "Viridis is better" are both simplistic and arrogant, because neither you nor I are in a position to know what exactly the task is in a given visualization, and different tasks merit consideration of different colormaps - the popularity of blanket statements like "Viridis is better" give people who haven't done as much research in data visualization the impression that vis is an adhoc collection of simple strategies, when it is far from that.
a decade or so later, people are still using jet and it still sucks!
If you want to highlight certain contours, plot the contour lines.
As others have said, the choice of colour scheme depends on the application. And it can even make sense to use a distinctly suboptimal scheme, if the goal is to produce graphs that can be compared easily with existing works. For example, annual reports of datasets are a lot easier to compare if the changes to the colour scheme are avoided.