Anyone who's chatted with me about figure design (at least in Astronomy) in the last two years has probably heard my rantings and ravings about some strange color pallet called cubehelix (not to be confused with timecube). I flat out love this color scheme, and I think it could work for you! Here's why:
1. It Works Better for YOUThe most notable feature about CUBEHELIX (or "cubehelix" if you prefer) is that it prints equally well in color and black & white! This is a great time saver when making figures for publications where color is only available online (if like in Astronomy you still use journals with print copies). CUBHELIX accomplishes this by cycling through the RGB cube, while constantly increasing the saturation (black to white). I like this figure, which explains how CUBEHLIX works and its name:
|From Dave Green|
To demonstrate the printability, I have made color palettes in both color and black & white for CUBEHELIX and the default for most plotting packages: rainbow:
|Now that's some sweet desaturation!|
2. It's Better for Everyone Else Too!Since CUBEHELIX desaturates "correctly", people with black & white printers are going to love you. They can print your amazing contour maps out and actually understand them! This goes double for showing figures on projectors. If the red channel goes out, or yellows are weak, your plots are going to be bulletproof. As I've said over and over: if I'm thinking about weird colors in your data visualization, I'm not thinking about the insightful or groundbreaking results you're trying to show.
Perhaps even more importantly, CUBEHELIX is pretty friendly for your colorblind readership! Here's an example of my default CUBEHELIX color scheme, followed by simulations for how it is seen by people with three types of colorblindness:
These colorblindness simulations were done via this very nice tool.
CUBEHELIX generally does very well for all these forms of colorblindness, thanks to the constant change in saturation. Approximately 8-10% of men have some form for color perception deficiency, and if you make density maps with normal saturated rainbows you're kicking this audience (possibly students, colleagues, future employers) in the knees. Shouldn't our default color schemes be the easiest for everyone to see?
Fun aside: test how well you can differentiate colors! (I scored a 15...)
3. It's Super VersatileCUBEHELIX, as defined by Dave Green (2011), has several useful "knobs" you can adjust. This includes: how many times through the rainbow to go, from what color to start, which direction to go (roygbiv vs vibgyor), how fast to go from black to white, and how saturated to make the colors.
A few simple examples to demonstrate the versatility! Here I've included 4 tests:
- my default scheme going "backwards" through the rainbow wheel once (rotation = -1, vibgyor),
- once through the wheel the proper direction,
- zero color movement (just black to white) starting at blue,
- and 5 times through the rainbow... because why not?!
This makes a nearly limitless family of color palettes available. If you have multiple datasets to plot together you could use rotation=0 and simply change the starting color. Making heatmap schemes in any hue is effortless. If your figures include both contours and lines/points, you could use the pastel-like CUBEHELIX for the contours and highly saturated/deep colors for the points to make the contrast really pop.
4. You probably already have itRejoice! CUBEHELIX is already included in the current version of matplotlib! If you Astronomers use IDL for plotting, I have created an easy to use version. Bonus: David Fanning now includes my CUBEHELIX code in his widely used software library!
A few other versions exist as well, check out Dave Green's website for details. If your language environment of choice is not included, and you can create custom color pallets using RGB vectors (or possibly even with hex codes) it is almost trivial to code up the original color scheme as I did in IDL (use the original paper). I'd love to see it added to Tableau...
I have helped put up a version for Tableau
and ported my IDL version to Python!