Home Artificial Intelligence 5 Steps to Construct Beautiful Stacked Area Charts with Python

5 Steps to Construct Beautiful Stacked Area Charts with Python

0
5 Steps to Construct Beautiful Stacked Area Charts with Python

Tips on how to use the complete capabilities of Matplotlib to inform a more compelling story

Electricity Production by Source within the US — Image by Writer

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 vital.
Great data poorly presented is not going to catch the eye it deserves while poor data presented in a slick way will easily be discredited.

I hope this can 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 effective 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 give attention to 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 example the methodology, I used a public dataset containing details about how the US are producing their electricity and which may be found here — https://ourworldindata.org/electricity-mix.

On top of being an incredible 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

LEAVE A REPLY

Please enter your comment!
Please enter your name here