A Simple One-Liner to Create Professional Looking Matplotlib Plots

Improve the default styling of Matplotlib.

The default styling of matplotlib plots appears pretty basic at times. Here's how you can make them appealing.

To create professional-looking plots for presentations, reports, or scientific papers, try LovelyPlots.

It provides many style sheets to improve their default appearance, by simply adding just one line of code.

To install LovelyPlots, run the following command:

pip install LovelyPlots

Next, import the matplotlib library, and change the style as follows: (You don’t have to import LovelyPlots anywhere)

import matplotlib.pyplot as pltplt.style.use(style) ## change to the style provided by LovelyPlots

Print the list of all possible styles as follows:

plt.style.available

Get Started: LovelyPlots Repository.

👉 Read what others are saying about this post on LinkedIn.

👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.

👉 If you love reading this newsletter, feel free to share it with friends!

Find the code for my tips here: GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

Reply

or to participate.