πŸ™ˆ A chart type that can tell whatever you want


πŸ‘‹ Hey there!

The sky is gray here, and I’ve got a delightful cup of tea in hand. The perfect setup to share another nugget of dataviz wisdom with you, all in under 3 minutes as usual. πŸ™‚

If you work in data analytics or data visualization, there’s a debate you’re almost guaranteed to encounter at some point:

​

Dual Y-Axis Charts: Good or Bad?

😱😱😱😱😱

For the uninitiated, a dual Y-axis chart uses 2 vertical axes on either side of the chart to represent 2 variables with distinct scales, plotted against a shared horizontal axis.
​
It looks like this! (R tutorial on the left, Python on the right:

This topic sparks endless debate! πŸ™ƒ

​

Short answer: They’re bad.

Hadley Wickham, the creator of ggplot2, famously avoided implementing dual Y-axis functionality in the library. He even explained his reasoning on Stack Overflow.

My favorite dataviz blogger, Lisa, wrote a brilliant blog post on this topic. Not only does she break down why dual Y-axis charts are problematic, but she also offers some fantastic alternatives!

When I was a software engineer at Datadog, I faced the same dilemma. Despite my reservations, client demand pushed us to implement dual Y-axis charts using D3.js and React. πŸ™ˆ

​

So, why are they bad?

Reason 1: They are hard to read, and it is proved that people get them wrong in this research paper.

Reason 2: You can easily manipulate the axis limits to tell any story you want. A small tweak to those limits, and suddenly, the narrative shifts in your favor.

To illustrate this, I’ve created a little interactive playground.

It features a dual Y-axis chart showing the GDP growth of the world (left axis) and France (right axis). By adjusting the axis limits, you can make it seem like one is growing faster than the other. Or the opposite.😱

​

Takeaway

Dual Y-axis charts are misleading. If you need a quick way to prove it, check out my interactive playground. If you have more time, I highly recommend reading Lisa’s blog post!

Hope it helps, and see you next week! 😊

Yan
​
​PS: if you want to learn how to make interactive graphs like this, please let me know! I'm hesitant to create a workshop to introduce d3 to R/Python users
​
​PPS: this week we shipped the third module of Matplotlib Journey and reached 250 students!! 😳 This means the price will increase in a few days. Come and join us!
​

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