5 ms·
Rainbow Color Map Still Considered Harmful (2007) [pdf]
- joannajohn 5y agoFine
- an1sotropy 5y agoIn the tradition of "considered harmful" papers, I think this is one of the less convincing. Or rather, it doesn't meaningfully answer the question: if the rainbow colormap is so awful, why is it still so common? Is it really "due to inertia", as the authors suggest? Or is there some other virtue? 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.
- touisteur 5y agoI always thought that it was a quick metaphor for heat(red, white) and cold (blue, black). I have a hard time relating other colormaps in the same way. Maybe the difference is not 'conceptual' but some atavic or cultural reaction?
- timy2shoes 5y ago> if the rainbow colormap is so awful, why is it still so common? 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."
- esyir 5y agoWhen I was a student, I too used it for a relatively banal reason: it looked pretty.
- vlmutolo 5y agoThe problem is that people will naturally interpret colors on certain scales whether that was intended by the authors or not. The goal of visualization is to make the natural reaction the correct one. https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/ 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.
- an1sotropy 5y agoThe implicit assumption there is that all data visualizations should be fast or "natural" to comprehend. Some people think that all user interfaces should be simple and easy for novices. Those people are not airplane pilots, or train engineers, or art historians for that matter. 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.
- CorrectHorseBat 5y agoTheoretically sure, but in reality people who like jet don't even know what the issue with jet is, let alone they can correct the non-lineairity. 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?
- an1sotropy 5y agoFor example, if you want to show the spatial extent of some Gibbs (ringing) phenomenon at the edge of a structure that itself takes on a wide range of values (this is descriptive of visualizations I've had to make). The basic shape of the structure, and its low-frequency value patterns are already known (part of the problem definition), so increasing discriminability will make the colormap more useful.
- 5y ago
- GuB-42 5y agoI think it is just misuse. 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.
- yongjik 5y agoI think the problem is that rainbow shows banding, but only in some arbitrary narrow range, and then pretty much ignores a large swath of values that all map to slightly different hues of green. So the "bands" you see are not representative of the underlying data, unless you're lucky. 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.
- hprotagonist 5y agohttps://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-colormap/ https://jakevdp.github.io/blog/2014/10/16/how-bad-is-your-co... a decade or so later, people are still using jet and it still sucks!
- chrismorgan 5y agoThe integrity of the argument may be harmed somewhat by the use of an inferior gradient blending technique. Eyeballing Figure 3, the gradient interpolation is linear, which is a common but bad technique. https://larsenwork.com/easing-gradients/ https://larsenwork.com/easing-gradients/ shows some nice examples of the problems and the proper easing technique. Moreover, looking at the green–red gradient especially, I think the interpolation may have been done in sRGB space, which is awful for these sorts of things (on the other hand, they do call it isoluminant green–red, so I may be missing the mark in my sRGB guess—it’s hard to be sure by just eyeballing). On the matter of such colour spaces, https://raphlinus.github.io/color/2021/01/18/oklab-critique.html https://raphlinus.github.io/color/2021/01/18/oklab-critique.... has the best tool for demonstration and comparison that I know of. 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.
- deleted 5y ago[deleted]
- sega_sai 5y agoI certainly understand some arguments against rainbow, but in the same time the new default colour map in matplotlib (viridis) is (IMO) worse for many applications. It doesn't give enough contrast/doesn't define contour-lines so well as rainbow. It' true that I could probably find some other colour map, but I still often switch to jet.
- beojan 5y agoPart of the point of viridis is to not have random contours that stick out because of the colour map. If you want to highlight certain contours, plot the contour lines.
- NavinF 5y agoTurbo has all the contrast, but none of the false contours of Jet: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html https://ai.googleblog.com/2019/08/turbo-improved-rainbow-col...
- bluenose69 5y agoI suggest turbo to lots of people who love jet and they find it a useful replacement for those cases where the distinctness of colours is helpful, e.g. noisy fields for which contours are too much of a mess to understand. 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.
- echelon 5y agoViridis is my favorite and solves so many problems. Magma/plasma/inferno are nice too. https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html 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-colormap-viridis-over-jet https://stats.stackexchange.com/questions/223315/why-use-col... https://medvis.org/2016/02/23/better-than-the-rainbow-the-matplotlib-alternative-colormaps/ https://medvis.org/2016/02/23/better-than-the-rainbow-the-ma... Use viridis.
- an1sotropy 5y agobut you know that this simplistic "use viridis" advice is about as sound as saying "use eslint" or "use python" or "use double precision [floating point]". All of these things may be helpful advice in many circumstances, when the audience doesn't know any better. 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.
- echelon 5y agoViridis is strictly better for human perception, and I cited a lot of arguments and evidence for this. I guess I don't understand your take here.
- an1sotropy 5y agoWe may be approaching this with different levels of expertise. 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.
- ridaj 5y agoSee also https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html https://ai.googleblog.com/2019/08/turbo-improved-rainbow-col...
- aurelwu 5y agoit's rather strange they suggest red-green as an alternative given that this combination is affected by the most common form of color-weakness/blindness.