πŸ” To stack or not to stack?


All my newsletter issues are now available online. Share them with a friend!

​

πŸ‘‹ Hi!
​
Last week I shipped a whole new module about annotation in my matplotlib journey online course πŸŽ‰.
​
I also shared with you a few thoughts about how legends should often be replaced by annotation.
​
I shared this graph to illustrate my idea:
​

​

Some people replied to me asking some legit questions about this stacked area graph (thanks! πŸ™)
​
Soooo, should we stack data like that? πŸ€”

​

​

What is a stacked area chart?

A stacked area chart is like a regular area chart, but instead of overlapping, each series is stacked on top of the previous one.

It’s useful for showing both the overall trend and how individual groups contribute to the whole.

At first glance, it's a powerful tool!

​

But… there’s a catch.

Consider this variation: a percent stacked area chart.
​
Take a moment and try to figure out how the second group (in green) is evolving:

Is it increasing or decreasing?
​
πŸ€”

Hard to tell, right?
​
πŸ€”

Here’s the same data, but with just the green group:

Much clearer!
​
That’s the problem. Stacking forces readers to mentally unstack the data, which is a lot of cognitive effort.
​
And let’s be honest, most people will misinterpret it.

​

So, should you avoid stacked charts?

Not necessarily.
​
It depends on the question you’re answering:
​
βœ… If you care about the total trend and individual groups are secondary β†’ Stacked charts are fine.
​
❌ If the focus is on how each group evolves independently β†’ Consider alternatives like line charts or, even better, small multiples.

I’ve written more about alternatives in my Data to Viz project. Feel free to check it out!

That's it for today! I hope you found this useful! And next time you stack your sandwich, maybe think of me. πŸ˜‰

​
See you next week,

​

Yan
​
​
PS: if you're a python user, note that my Matplotlib Journey project will be released totally at the end of the month!
​
PPS: I'm here to help! Any topic you would like me to talk about, please hit reply!
​

Yan Holtz

​Find me on X, LinkedIn, or check my Homepage​

​

πŸ‘‹ By the way, here is how I can help!

​

  • Master R: Join my productive R workflow online course, already helping hundreds to excel in R, Quarto, and GitHub.
  • Team Training: Hire me to train your team on Data Visualization and Programming.
  • Engaging Talks: Book me for short, impactful talks on Data Visualization and Programming.

​

Check yan-holtz.com or hit reply any time! I love hearing from you.

​

​

​

​

​

​

https://preview.convertkit-mail2.com/unsubscribe​
​Unsubscribe Β· Preferences​

background

Subscribe to Dataviz Universe