The way to use the complete capabilities of Matplotlib to inform a more compelling story
Telling a compelling story with data gets way easier when the charts supporting this very story are clear, self-explanatory and visually pleasing to the audience.
In lots of cases, substance and form are only equally necessary.
Great data poorly presented won’t catch the eye it deserves while poor data presented in a slick way will easily be discredited.
I hope this may resonate with many Data Analysts, or anyone who needed to present a chart in front an audience once of their lifetime.
Matplotlib makes it quick and simple to plot data with off-the-shelf functions however the wonderful tuning steps take more effort.
I spent quite a while researching best practices to construct compelling charts with Matplotlib, so that you don’t must.
In this text I deal with stacked area charts and explain how I sewed together the bits of data I discovered here and there to go from this…
… to that:
All images, unless otherwise noted, are by the creator.
As an instance the methodology, I used a public dataset containing details about how the US are producing their electricity and which could be found here — https://ourworldindata.org/electricity-mix.
On top of being an excellent dataset for instance stacked area charts, I also found it very insightful.
Source: Ember — Yearly Electricity Data (2023); Ember — European Electricity Review (2022); Energy Institute — Statistical Review of World Energy (2023)
License URL: https://creativecommons.org/licenses/by/4.0/
License Type: CC BY-4.0