Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 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: sample plot with gray and jet colormaps 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.

like image 527
ryggyr Avatar asked Aug 31 '11 02:08

ryggyr


People also ask

Why are rainbow Colormaps generally a poor choice for ordered data?

Even though most people aren't colorblind, rainbow color schemes can be confusing because there's no clear “greater than” or “less than” logic to ordering the colors, warn computer science researchers David Borland and Russell M.

What is a rainbow colormap?

Definition. The rainbow color map is named that way because it goes through all the rainbow's colors. The lower values are in the deep blue range and the higher values in the reds. In between it passes trough light blue green, yellow, orange …

What is a perceptually uniform colormap?

Sequential colormaps (that are perceptually uniform of course) are basic colormaps that start at a reasonably low lightness value and uniformly increase to a higher value. They are commonly used to represent information that is ordered.

What is Jet Colormap?

example. c = jet returns the jet colormap as a three-column array with the same number of rows as the colormap for the current figure. If no figure exists, then the number of rows is equal to the default length of 256. Each row in the array contains the red, green, and blue intensities for a specific color.


1 Answers

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!:

Perceptually improved demo

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.

enter image description here

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:

CMRmap demo

like image 114
endolith Avatar answered Sep 18 '22 18:09

endolith