It's quite common to use heat/contour maps when presenting time-frequency EEG findings. The colour scheme often chosen (and one that I like and use) is the "jet" colour scheme (see e.g., google image search time-frequency EEG). I'm wondering if there are any better colour schemes for presenting these plots, and/or guidelines for the presentation of such maps.

e.g., from R base library

x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
image(x, y, volcano, col = terrain.colors(100), axes = FALSE)

# With Jet colours
jet.colors <-  colorRampPalette(c("midnightblue","blue", "cyan","green1", "yellow","orange","red", "darkred"), space="Lab")
image(x, y, volcano, col = jet.colors(100), axes = FALSE)
  • 4
    $\begingroup$ Just my 2¢: RColorBrewer or colorspace offer far better options to handle diverging palettes of colors. $\endgroup$ – chl Oct 30 '12 at 9:34
  • 1
    $\begingroup$ I agree with @chl Brewer is the color maven, as far as I'm concerned. $\endgroup$ – Peter Flom Oct 30 '12 at 10:51
  • 1
    $\begingroup$ Unfortunately the page isn't working right now (potentially Sandy related), but there is a nice online blog/article about this by Bernice Rogowitz and Lloyd Treinish from IBM specifically about rainbow color schemes (see related discussion and some pictures at Flowingdata). $\endgroup$ – Andy W Oct 30 '12 at 11:31
  • $\begingroup$ Use anything but jet. The only reason anyone uses it is because it's the default in Matlab. $\endgroup$ – endolith Feb 26 '13 at 4:20

Rainbow color maps, as they're often called, remain popular despite documented perceptual inefficiencies. The main problems with rainbow (and other spectral) color maps are:

  • The colors are not in a perceptual order
  • The luminance bounces around: our eyes are mostly rods for luminance, not cones for color
  • We see hues categorically
  • Hues often have unequal presences (e.g., wide green and narrow yellow)

On the plus side:

  • Spectral themes have high resolution (more distinguishable color values in the scale)
  • There's safety in numbers; such themes are still quite common

See Rainbow Color Map (Still) Considered Harmful for discussion and alternatives, including black-body radiation and grayscale.

If a diverging scheme is suitable, I like the perceptually uniform cool-to-warm scheme derived by Kenneth Moreland in his paper, Diverging Color Maps for Scientific Visualization. It and other schemes are compared with images in the ParaView wiki, though with a perspective of coloring a 3-D surface, which means the color scheme has to survive shading effects.

Recent blog post with more links and Matlab alternatives: Rainbow Colormaps – What are they good for? Absolutely nothing!

Recommendation: First try grayscale or another monochromatic gradient. If you need more resolution, try black-body radiation. If the extremes are more important than the middle values, try a diverging scheme with gray in the middle, such as the cool-to-warm scheme.

Images from the ParaView wiki page:

Rainbow: enter image description here

Grayscale: enter image description here

Black-body: enter image description here

Cool-to-warm: enter image description here

  • $\begingroup$ Thanks, nice answer. EEG applications definitely need something that can easily identify extremes; both positive and negative voltages are important. So on this basis the Cool-Warm seems best. Any pointers on making the Cool-Warm scale more aesthetically pleasing (as a matter of personal taste, and possibly that of the field)? $\endgroup$ – Matt Albrecht Oct 31 '12 at 5:59
  • $\begingroup$ Looking more closely at some of the EEG figures, many don't have a stand out green colour. I think that may be a solution to my aesthetics, remove the green and fiddle about with some of the middle colours. $\endgroup$ – Matt Albrecht Oct 31 '12 at 6:14
  • $\begingroup$ I've updated the Cool-Warm pic since the original was a bit washed out for some reason. If a diverging scheme suits your data, there are plenty of others to choose from (see ColorBrewer, for instance). $\endgroup$ – xan Oct 31 '12 at 13:16
  • 3
    $\begingroup$ Don't forget color-blind palette versions of the above; leaving out green is generally a good idea, but there are some other color blind pitfalls to be wary of. 'research.stowers-institute.org/efg/Report/UsingColorInR.pdf' for more. $\endgroup$ – jbowman Nov 22 '12 at 18:04
  • $\begingroup$ That wiki link complete with RGB values for the gradients was super helpful. $\endgroup$ – Brent Writes Code May 5 '15 at 16:18

I agree with @xan about the inefficiencies of rainbow color maps. Here is another paper that shows that rainbow/categorical color maps are substantially worse than diverging ones for quantitative tasks, 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.

The only thing rainbow/categorical color maps are good for is to show separate values of categorical variables. However, the colors you choose matter. 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.

Color Palette analysis example


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.