Call me a procrastinator but I strongly believe that spending time to select a good color scheme can work miracles with a plot, paper, or presentation. In science, it’s generally not expected that you invest time into a thought process on something like aesthetics. I would dare to go as far as to say that it’s sometimes outright frowned upon if you do. Like if you were less of a scientist for caring if the plot design is good, just as its numbers are.
Needless to say, aesthetics is very subjective and if you do like bright yellow letters on blue background, I can do nothing but secretly roll my eyes. No offense. However, it’s also good to keep in mind that there are some basic principles of color theory, which are valid regardless of personal preference.
This video explains some of the reasons why understanding color is important and how to mix colors in the right way. But you might be asking how is this relevant for non-artists.
When presenting results, both in a Powerpoint presentation and in a figure, we are mostly interested in two things: 1) drawing attention to the most important piece of information that needs to be delivered, and 2) streamlining the flow of information if there are multiple pieces of information. Using the right colors can tremendously help with this.
The above is also the subject of “Rule 6: Use Color Effectively” in a paper by Rougier et al. (2014) titled Ten Simple Rules for Better Figures.
“Color is an important dimension in human vision and is consequently equally important in the design of a scientific figure. However, as explained by Edward Tufte, color can be either your greatest ally or your worst enemy if not used properly. If you decide to use color, you should consider which colors to use and where to use them. For example, to highlight some element of a figure, you can use color for this element while keeping other elements gray or black. This provides an enhancing effect. However, if you have no such need, you need to ask yourself, “Is there any reason this plot is blue and not black?” If you don’t know the answer, just keep it black.” (Rougier et al. 2014, PLoS Comput Biol)
And if we zoom out a step, the importance of having good figures is well described in “Rule 7: Deliver the results as a sequence of statements, supported by figures, that connect logically to support the central contribution” of a widely-shared paper by Mensch & Kording (2017) titled Ten simple rules for structuring papers.
“Figures, their titles, and legends are particularly important because they show the most objective support (data) of the steps that culminate in the paper’s claim. Moreover, figures are often viewed by readers who skip directly from the abstract in order to save time. Thus, the title of the figure should communicate the conclusion of the analysis, and the legend should explain how it was done. Figure making is an art unto itself; the Edward Tufte books remain the gold standard for learning this craft.” (Mensch & Kording 2017, PLoS Comput Biol)
Now you see how I’ve decided about the title for this post. The “Ten simple rules…” is a clear road to success.
Three categories of color schemes
Now that we’ve established why are good figures important, and why are good colors important, let’s talk about how to choose the colors.
The three basic color schemes depend on what kind of data you want to plot:
- Qualitative – for discrete or categorical data
- Sequential – for quantitative data ordered from low to high
- Diverging – for deviations from a mean or zero
From here, I would say it’s quite a freestyle. You can pick whatever colors you like and there are a gazillion of tools available for the purpose, but together with Katie and Stacy, I’m just going to give you a few tips for tools, which we like. We also strongly recommend Your Friendly Guide to Colors in Data Visualisation by Lisa Charlotte Rost. It’s a marvellous compilation of tools, some of which will be also highlighted here.
Some reading and tutorials
ggplots are the new black and this is a good summary on how to play with the colors and some nice colour scheme examples.
Don’t worry, it also covers the star of these days – viridis palette.
And here is a more advanced follow-up.
The color toolkit
Couldn’t omit this one. Great website for getting an idea of what colors look like next to each other.
The Swiss army knife of color
Looking for R colours, I usually go here, because it does recognize simple R color codes and it has suggestions on similar/contrasting colors and transformation into other color models.
When selecting plot colors, I find it important to take into consideration people who are colorblind, and this awesome site allows you to play with color combinations and automatically translates them into different types of colorblindness.
Plus here are some nice ready-made colorblind-friendly palettes.
How to describe your 50 shades of blue
And if you come up with the right colors but are struggling with how to describe your 50 shades of blue, here’s a webpage which gives you a name based on the color code.
This is brilliant way to check if your colors work all kinds of structures and line widths and.
Neat idea about putting images in the plot background.
Get inspired by true art
For movie junkies
Inspiration from real life
Generate a color palette from a picture. For example, of your model organism.
It does NOT end here
Done. Or not. I know there are so many more tools out there, but these are the ones that we actually use on a regular basis and thought most deserving of highlighting. If your favourite tools is not here, I welcome you to add it in the comments. It will be helpful for us and for all the other readers. We can use this space as our community depository of useful color tools in data visualization.
I want to thank Katie and Stacy for pointing out some of these resources!
Rougier, N. P., Droettboom, M., & Bourne, P. E. (2014). Ten simple rules for better figures. PLoS Comput Biol, 10(9), e1003833. https://doi.org/10.1371/journal.pcbi.1003833
Tufte, E. R. (2001). The visual display of quantitative information (Vol. 2). Cheshire, CT: Graphics press.
Mensh, B., & Kording, K. (2017). Ten simple rules for structuring papers. PLoS Comput Biol, 13(11): e1005830. https://doi.org/10.1371/journal.pcbi.1005619