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

ryggyr picture ryggyr · Aug 31, 2011 · Viewed 16.7k times · Source

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:

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.

Answer

endolith picture endolith · Oct 9, 2012

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