开发者

Is there a better color scale than the "rainbow" colormap?

开发者 https://www.devze.com 2023-04-01 02:26 出处:网络
I am plotting a series of curves in x, y space, where each curve is identified by a scalar value z. I wish to map the z value to color for each line, but most colormaps / color tables are constructed

I am plotting a series of curves in x, y space, where each curve is identified by a scalar value z. I wish to map the z value to color for each line, but most colormaps / color tables are constructed with images in mind (e.g. on a white backround, the grayscale colormap hides one extreme of z).

The rainbow/spectral/jet colormap - which is the default in many plotting programs - is better, but suffers from poor visibility for the yellow/cyan lines on 开发者_JAVA百科white backgrounds, and poor color contrast among the blue/cyan/green colors. Borland and Taylor further discuss this and other problems with the rainbow colormap:

  • Borland and Taylor, "Rainbow Color Map (Still) Considered Harmful," IEEE (2007). [pdf]

Can someone recommend something better? Some aspects I'm looking for:

  1. High visibility for all colors against a white background
  2. Intuitive perceptual ordering (red-yellow-blue makes more sense than red-blue-yellow)
  3. Good chromaticity contrast between colors

Edit/update: per endolith's request, here's a simplified sample plot:

Is there a better color scale than the "rainbow" colormap?

The "gray" colormap and it's relatives (starting at black and ending at white) are designed for images, however when used to plot lines or points on a white background, some will be hard to see or invisible. The "jet" colormap and it's spectral relatives typically also have a yellow, green, or other color that is hard to see on a white background.


Perceptually improved colormaps has several variations of rainbow colormaps with constant luminance or luminance that increases monotonically, with some documentation at The rainbow is dead…long live the rainbow!:

Is there a better color scale than the "rainbow" colormap?

Dave Green's `cubehelix' colour scheme is a rainbow colormap "intended to be perceived as increasing in intensity .. from black to white, deviating away from a pure greyscale (i.e. the diagonal from black to white in a colour cube) using a tapered helix in the colour cube, while ensuring a continuous increase in perceived intensity". You could cut off the white end to make it suitable for a white background.

Is there a better color scale than the "rainbow" colormap?

CMRmap.m "we devised a colormap that preserves colors, but mixes the color components so that the black and white rendering of the colormap produces a grayscale representation that is monotonic with intensity". Again, you'd have to clip off the white end:

Is there a better color scale than the "rainbow" colormap?


Here's the solution that I eventually used:

Kindlmann et al identified several isoluminant colors based on a face-based luminance matching study (available as html talk or pdf paper). The colors and RGB triples they found are as follows:

  1. red (0.847, 0.057, 0.057)
  2. yellow (0.527, 0.527, 0)
  3. green (0, 0.592, 0)
  4. cyan (0, 0.559, 0.559)
  5. blue (0.316, 0.316, 0.991)
  6. magenta (0.718, 0, 0.718)

Linear interpolation between these points creates a modified "isoluminant rainbow" colormap that provides better contrast with a white background than the typical rainbow colormap using fully saturated yellow and cyan. In some cases, I use only a subset of these points to interpolate the colormap (for example by dropping the green or cyan).

Is there a better color scale than the "rainbow" colormap?


Rainbow/categorical color maps have been shown to be substantially worse than diverging ones for quantitative tasks. See this recent paper from InfoVis '11:

  • Michelle Borkin, Krzysztof Gajos, Amanda Peters, Dimitrios Mitsouras, Simone Melchionna, Frank Rybicki, Charles Feldman, and Hanspeter Pfister. 2011. Evaluation of Artery Visualizations for Heart Disease Diagnosis. IEEE Transactions on Visualization and Computer Graphics 17, 12 (December 2011), 2479-2488. DOI=10.1109/TVCG.2011.192 Link to PDF, Slides, and Images.

Is there a better color scale than the "rainbow" colormap?

If you need a categorical scale, check out this excellent paper from CHI '12 that uses the XKCD survey dataset that talks about how we perceive differences in color. It allows you to rate a color scale by how well humans perceive the differences. Their web-based Color Palette Analyzer will let you evaluate your own color scale, too!

  • Jeffrey Heer and Maureen Stone. 2012. Color naming models for color selection, image editing and palette design. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI '12). ACM, New York, NY, USA, 1007-1016. DOI=10.1145/2207676.2208547 Link to PDF, online demos, etc.

Is there a better color scale than the "rainbow" colormap?


I would use Color Brewer for choosing colors. It gives various color palettes for maps depending on what your requirements are. The same palettes can be used for other visualizations.

Edit: Below are some more resources, but the recommended sequential colors start from a lighter color which is what you pointed out in your comment. Another option is to just copy what others are doing. For instance, the colors used in Many Eyes would probably work.

  • http://geography.uoregon.edu/datagraphics/color_scales.htm
  • http://wayback.archive.org/web/20130221074810/http://msbicentral.com/Resources/Articles/tabid/88/articleType/ArticleView/articleId/124/Using-Color-in-SSRS-Charts.aspx
  • http://web.natur.cuni.cz/~langhamr/lectures/vtfg1/mapinfo_2/barvy/colors.html


A good resource I found are the notes by Paul Tol, found here: http://www.sron.nl/~pault/

On that site you can find a few good colour palettes for plotting unordered, distinct datasets as well as diverging and rainbow colour maps for ordered data.

"To make graphics with your scientific results as clear as possible, it is handy to have a palette of colours that are:

  • distinct for all people, including colour-blind readers;
  • distinct from black and white;
  • distinct on screen and paper;
  • still match well together."


I have this problem all the time. What I usually end up doing is taking a two color sequential scheme and cutting off the excessively low saturation portion. This works as long as there are only a few lines. However, I don't love this method and I would love to hear a better suggestion...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号