17
$\begingroup$

I have noticed that many "state of the art" plotting packages and themes and many distinguished data folks use grey background for their plots. Here are several examples:

ggplot2:

enter image description here

Nate Silver's fivethirtyeight.com:

enter image description here

While in the first example above (ggplot2), one may argue that using grey background reduces the ink needed for grid lines, this is certainly not the case with the second case. What are the advantages of using grey background, as opposed for white or transparent one?

$\endgroup$
12
  • 2
    $\begingroup$ A plot is a dish served - grey background is a plate. $\endgroup$ – ttnphns Jan 6 '15 at 14:18
  • 3
    $\begingroup$ @ttnphns I like the analogy. Hadley Wickham said of ggplot's background: "The grey background gives the plot a similar colour (in a typographical sense) to the remainder of the text, ensuring that the graphics fit in with the flow of a text without jumping out with a bright white background. Finally, the grey background creates a continuous field of colour which ensures that the plot is perceived as a single visual entity." He also justified gridlines on the basis that they can easily be "tuned out". $\endgroup$ – Silverfish Jan 6 '15 at 22:03
  • 1
    $\begingroup$ ttnphns I also really like your analogy. @silverfish yes, exactly right, with the grey scale matching a squint your eyes and compare the plot square with the text on the page. Hadley has made the grey background popular. His design with the grey plot background but white support (axes) makes it clear where the data begins and ends. And the data pops out with more visibility than the background grid, which follows good cognitive principles. The grid sits back until you need to use it to look up values. $\endgroup$ – Dianne Cook Jan 7 '15 at 22:39
  • 3
    $\begingroup$ @Silverfish Look first to Jacques Bertin (Semiologie Graphique), Alan MacEachran (How Maps Work), and Lee Wilkinson (The Grammar of Graphics). MacEachran gives the full physiological, psychological, and cultural details with loads of references. Don't be put off by the reference to "maps": his book is concerned primarily with how people interact with and create meaning out of informational graphics in general, of which maps are just a salient example. $\endgroup$ – whuber Jan 7 '15 at 22:53
  • 2
    $\begingroup$ @silverfish It is possible that dan carr's work, who started using the grey background and white grid lines with the tables to plots work in the early 90s dev.bowdenweb.com/maps/m/using-gray-in-plots.pdf is the source of the idea. I know Hadley and discussed this. But the analogy to the text squint grey scale is Hadley's explanation. $\endgroup$ – Dianne Cook Jan 13 '15 at 17:03
19
$\begingroup$

The data-ink ratio

This concept is due to the very influential Edward Tufte, of Yale University, who described it in The Visual Display of Quantitative Information.

He distinguishes "data ink" (which includes points, bars etc but also textual or grpahical labels) from erasable ink (including gridlines, axes, borders, and also redundant information). The data-ink ratio is simply that proportion of the ink used which can't be erased.

There is a discussion of how these data-ink principles might apply to computer visualisations on the UX stack exchange site.

Why do some experts prefer a grey background?

Hadley Wickham has justified his choice of default background, in his book on ggplot2:

The grey background gives the plot a similar colour (in a typographical sense) to the remainder of the text, ensuring that the graphics fit in with the flow of a text without jumping out with a bright white background. Finally, the grey background creates a continuous field of colour which ensures that the plot is perceived as a single visual entity.

The principle seems to be to stop it "jumping out" at the viewer on a printed page and to provide visual unity. Personally I also like the reduced screen glare.

He also justified the white gridlines on the basis that they can easily be "tuned out". I agree with Dianne Cook in the comments that this lets the data stand out above the gridlines, reducing visual clutter. The white gridlines are one advantage of a slightly darker background — interestingly, Tufte generally avoids gridlines where they are not necessary (they do not count as "data ink") but on some grey bar charts overlays white gridlines. In some ways this is a similar effect to ggplot2, but actually puts the gridlines in the foreground, giving the bars a "striped" appearance. A particular disadvantage of this is that you can't see the next-highest gridline above a bar, making it hard to visually interpolate how high a bar is numerically.

Why do some experts prefer a white background?

One of the most-viewed ggplot2 threads on Stack Overflow is " How do I change the background color?" which suggests the default is not universally popular.

The colour of an element can appear quite different depending on what background colour it is displayed against. Tufte actually discusses this in Chapter 5 "Color and information" in his book Envisioning information but doesn't put this in the context of e.g. a scatter plot. Maureen Stone, a colour expert and adjunct professor at Simon Fraser University, strongly recommends a white background for various reasons, including that most colour palettes (in your examples, used to indicate the species or division) have been designed with a white background (for printing) in mind. Their perceptual properties will differ against a darker background. She suggests that white has a perceptual advantage, because our colour perception is relative to "local" white, so having a white background visually available can stabilise our perception.

She also suggests a more practical reason that I am familiar with: that using a white background allows you to optimise a graph for both electronic display and printing, rather than having to prepare a different printer-friendly version.

$\endgroup$
1
  • 2
    $\begingroup$ +1 for painting (as it were) both sides of the issue. I'd heard Hadley's reasoning but hadn't heard Stone * Fraser's. Thanks! $\endgroup$ – Wayne Feb 3 '15 at 15:35
8
$\begingroup$

As long as the background is light enough to provide good contrast with the data marks, it's mostly a matter of aesthetics whether it's white or light gray. While the background color is "ink" in some sense, I don't think it counts as "ink" logically. There is no proportional distraction from a solid field of light gray.

Conversely, the grid lines count as logical "ink" in both cases. Even though the white grid lines would consume no ink to print, they still break up the background and create extra visual processing work. I'd say the 538 grid lines take less logical ink because they have less contrast.

$\endgroup$
1
  • $\begingroup$ "I'd say the 538 grid lines take less logical ink..." -- I agree, I find the default ggplot2 gridlines extremely distracting. In the ggplot2 example at the top of the OP's question, my eyes are drawn to the gridlines rather than the data. $\endgroup$ – Adrian Mar 9 '16 at 13:23

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.