Line Chart Remake

I teach data visualization with R and Python, which means I review hundreds of charts from talented students. The same issues come up again and again.
This page takes a chart with a solid message and improves it step by step. It is a practical way to revisit the most common pitfalls and see the impact of each fix. Let us dive in!
š Original Chart and Code
Reddit hosts an active channel called relationship_advice where people share their relationship struggles to get guidance. Recently, @GeorgeDaGreat123 used AI to analyze fifteen years of comments from this wild corner of the platform.
It sparked plenty of debate, but that is not the focus here. Instead, let's take a look at the original chart that's been published:
Everything starts with a pretty classic line chart. Each line shows the proportion of a group of comments. The comments advising the break up the relationships are in red, the ones advising to communicate better in blue and so on.
From the graph style, I'm pretty sure it's been made using Python and Matplotlib.
My first step was to reproduce this graph. Not easy, as the underlying data is not available anywhere. In a perfect world everything would be hosted on Github together with the code but hey š¤·āāļø
I gave the chart to a LLM to extract approximate data and rebuilt it using Javascript and D3. The result is quite close isn't it? Now the fun starts.
The legend forces readers to jump back and forth to understand the lines. It creates unnecessary cognitive load.
Direct labeling fixes it.
A simple improvement: remove the spine. It adds clutter without conveying any information.
Iām not a big fan of dense grid lines. In our decluttering mission, removing the horizontal ones is an easy win.
Let's improve the Y axis. The axis title is kind of useless, we just have to add a % next to the numbers and everything gets more obvious, with less clutter!
Now it's obvious that the X axis needs an improvement too! The nuber 20 was repeated so many times! Let's show only what matters shall we?
Also, it's pretty obvious that it's a year, so the Axis title isn't really useful was it?
The author name label at the top right was annoying. It's competing with the most interesting part of the chart: the location where the "end relationship" line spikes.
Let's show it as a caption instead, with a bit of formatting.
The title and subtitle don't work: they are descriptive instead of telling a story. You're reader is in a hurry, he wants to understand instantly what's going on here. And you want them to be hooked.
Let's change the wording to something that'll make people stop scrolling and still understand what the graph shows.
A few design golden rules: everything must be aligned with something. Use hierarchy of information. What's important must be big and obvious. Alignment matters.
Title looks better now doesn't it?
Hey, let's add a slight background with some good margins around!
š® Your turn
Contact
š Hey, I'm Yan and I'm currently working on this project!
Feedback is welcome ā¤ļø. You can fill an issue on Github, drop me a message on Twitter, or even send me an email pasting yan.holtz.data with gmail.com. You can also subscribe to the newsletter to know when I publish more content!



