If you have ever worked with a data scientist you’ve probably witnessed the outpouring of snark and dismissal that comes at the mere mention of a pie chart. I myself once rolled my eyes so hard I saw my brain… But what could possibly be so egregious about the humble pie? Why do data practitioners loathe it so? Is it aesthetics? Is it a lack of coolness?
In one word: Utility.
Shapes and perception
Let’s talk about Stevens’s Psychophysical Power Law. I love talking about it mostly because I like to sound important. But also I talk about it because it provides an excellent guide for the right shapes to use when designing data visuals.
Stevens’s Law shows how large we perceive shapes to be as they grow by a given proportion (Wikipedia, fetched on 1 Dec 2018). Strictly speaking it is about all stimuli, not just shapes.
In the plot above the horizontal axis shows the actual magnitude proportion of two shapes, while the vertical axis maps human perception of this magnitude. For example, a value of 4 on the horizontal axis denotes that one line is four times longer than another line. This reality maps one-to-one to human perception.
This makes for a fun experiment that you can bring home or to the office: show your pals two lines and ask them to estimate how much longer one is compared to the other. The consensus number will be very close to the real scaling factor. Then repeat for the area of a circle: I guarantee that your friends will not guess right.
(The electric shock line is offered for illustration only. Please do not apply electric shocks to your pals or colleagues. Do not attempt without adult/managerial supervision).
Eat your pie and plot a bar chart
This experiment demonstrates a fundamental limitation in our perception: when it comes to parsing visual information some shapes are easier to interpret than others. When we design plots we need to circumnavigate these limitations by carefully choosing shapes—called glyphs in the vis biz.
A pie chart may look as cute as a button but ultimately its shape works against the message it tries to convey. So where does that leave us?
I have already hinted that lines are easier to interpret than circles. Let’s contrast the two designs: I have fetched some OECD data of the breakdown in size of small businesses–a specification that is likely to be executed through a pie chart.
While the intrinsic shape of a bar plot is not as pleasing to most eyes as a pie, bars offer some real advantages. They provide an intuitive left-to-right or right-to-left sorting, and they require minimal annotation to convey relative magnitude. With the addition of gridlines perpendicular to the stretch of the bars (i.e., horizontal lines for vertical bars) we get a great help in interpreting the relative length of separated bars. In this case I have made the bars slightly opaque to reveal the gridlines.
Bar plots also allow the conveyance of more info: in this case we have absolute numbers on the y-axis as well as the intuitive relative breakdown. And because we have axes we can label them in an orderly fashion. Crucially for the design process they can be customised to a greater extent than a pie chart.
Try out a bar chart next time your plotting tool recommends a pie!
3 thoughts on “Cognitive Science Vs. The Pie Chart”
Robert Kosara who works at Tableau performed several empirical studies that evaluated pie chart efficiency. His studies imply that the pie charts are not as bad as their reputation implies (provided they are performed well). Robert summarized his thoughts about pie charts here https://eagereyes.org/pie-charts
Thanks for that Boris! There are a couple of decent uses for pie charts, such as tracking toward a goal or depicting binary choice. Parity is easy to show as two equal semi-circles and any imbalance shows up well. If the focus, however, is to quantify with precision we will still need labels, which begs the question: why not just tabulate? Bars can be annotated with x-ticks to avoid that issue so they win on precision.
> why not just tabulate?
Because charts are c3wl 🙂
More seriously, Stephen Few in his “Show me the numbers” has several excellent examples that combine bar charts with tabular data. On the other hand, sometimes “parity” is the most important take. In a workshop that I gave in the past, I have an example where a bar chart (combined with tabulation) is a much better alternative to a pie, and when a pie chart is a better alternative to a bar chart: https://youtu.be/H-K_fSA54AM?t=3504