Earlier this week, we were treated to some lovely unadulterated* sciency data, in the shape of a map of sea level rise in the last 18 years. The story got good coverage in the mainstream media, and an old friend of mine even got quoted on the BBC. Great.
The reaction on twitter however, often ran along the lines of “nice map, shame about the colour scheme”. One person even said something like “it’s a bit vomity”.
That sounds like a challenge, and here at Better Figures, vomity just will not do. To be fair, that particular colour scheme is widely used in climate science, as one of the defaults in a rather widely used programming language.
I humbly present a number of new versions of a sea level trend map. Which one do you prefer?
The data are from a different source, but show a very similar thing: satellite measurements of the trend in sea level over the last 19 years. I’ve plotted everything in R, using palettes created by these smart people at Penn State. The palettes are available in the RColorBrewer package. The R package fields from UCAR is also pretty useful here. I haven’t got a pretty digital terrain map, so land is white. I’m afraid I’ve wrapped the globe from 0-360 degrees longitude, to save time.
The palette should be diverging – that is, zero is in the middle. A grey scale doesn’t work in this case, as you wouldn’t be able to tell very positive from very negative. To get zero in the middle, I’ve had to cut off some of the highly positive values. This is a choice that highlights one particular feature (the overall positive nature of the data), but de-emphasises the extreme high values.
Here is a near recreation of the original map, in the default setting from the fields package, tim.colors:
We can get a bit more subtle, easing the impact on the eye with the ‘Spectral’ palette.
Blues and reds work better than greens and reds, if you want to make sure that the colour blind can read your plots. This one goes through yellow as a zero.
Ed Hawkins suggested blue to red through white. I like this one, but we reserve white for “more uncertain” in some of our other work.
Brown through teal is usually reserved for dryer/wetter.
I think the black-to-red palette has a certain elegance.
I couldn’t bring myself to do a purple-through-orange plot. You can do it if you like, by amending the R code that generated these plots. Good luck with that.
Your comments, suggestions and criticisms welcome, as always.
OK, for curiosity’s sake, and after reading some of the resources provided by Mark Brandon in the comments, here are the rest of the diverging palettes from RColorBrewer
The advice is, “if you must use green, pair it with magenta”. Might work without the reverse, this one.
No, adding a liberal dash of purple doesn’t really help. Move along.
Ah, I take it all back. The purple to orange/brown works for me, anyway. Anyone else?