The best part? You’ll only have to do this once.
Every Matplotlib chart has the potential to go viral. But not with the default theme.
Let’s be honest: default styles aren’t going to stop anyone in their tracks. If you want to make your reader pay attention, you’ll need more than a resolution bump or a new font. You’ll need a custom theme.
It’s the only way to make your charts look yours. It’s the only way to make your reader stop scrolling. The good news? Matplotlib makes it incredibly easy to write custom style sheets from scratch. Even better — you can make your custom theme available system-wide!
And in today’s article, you’ll learn how to do just that.
Two Functions You’ll Need For Plotting Bar and Line Charts
For the sake of repeatability, I’ll provide you with two functions for plotting a bar and a line chart.
The goal of setting a custom Matplotlib theme isn’t to change the underlying Python code — but rather to leave it as is — and see what the visual differences are.