๐Ÿ” Unstack This: a new chart type you'll definitely use!


๐Ÿ‘‹ Hi!

Hope things are going great on your side of the world.
โ€‹
Over here, life is pretty sweet: I'm writing this while sipping mint tea in Morocco, where my brother is getting married! โ˜€๏ธ๐ŸŽ‰

Anyway, today I want to share something I love about the dataviz world: It's 2025, and somehow...

Weโ€™re still inventing new chart types!
โ€‹
Let me show you in just a few minutes as usual.

โ€‹

๐Ÿคฏ The trouble with stacking

Stacked bar & area charts are everywhere.
โ€‹
But they have a problem: they make it really hard to compare subgroups, especially the ones that arenโ€™t sitting at the bottom.

Take this example from my Data to Viz project. Can you tell how the middle green group changes over time?

Itโ€™s tough, right?
โ€‹
The lack of a shared baseline makes it almost impossible. (Answer is here btw).

โ€‹

๐Ÿ”„ Grouped barplot to the rescue?

A grouped barplot fixes this by placing bars side-by-side instead of on top of each other.

Now, you can compare subgroups easily... but it's the total of each group that becomes very hard to grasp. ๐Ÿ™ˆ
โ€‹
Youโ€™d have to sum all the bars in your head.

โ€‹

โžก๏ธ Nested Column Charts

A few weeks ago, something cool popped up in the dataviz bubble.
โ€‹
A new chart type called the nested column chart, apparently invented by Brittany Rosenau.

Imagine a grouped barplot, but with a big grey block behind the bars representing the total.

Itโ€™s brilliant. ๐Ÿ”ฅ

Now you can compare both the subgroups and the total at a glance.

How did I not think of this earlier?


๐Ÿ‘จโ€๐Ÿณ Make your own!

You know I love dataviz tools & programming. So here is how to make this at home:

Python: Joseph Barbier and I made a tutorial on the Python Graph Gallery.

R: Here's a quick gist to make it with ggplot2.

React + D3.js: Of course I had to build a version for web devs! With an extra touch: hover over subgroup names to highlight them in the chart โœจ


So next time youโ€™re about to reach for a stacked or grouped barplotโ€ฆ try a nested column chart instead.

And if you do, send me a screenshot. Seriously. Itโ€™ll make my day.

Cheers,
โ€‹
Yan
โ€‹
โ€‹PS: another cool thing happened this week. A student of my Matplotlib Journey course used his newly acquired skills to make a pretty chart that triggered a lot of interest on LinkedIn.
โ€‹
It's a cool way to represent a population pyramid so I thought I would share it too :)

โ€‹

โ€‹

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