Daily Dose of Data Science

Share this post

A Simple One-Liner to Create Professional Looking Matplotlib Plots

www.blog.dailydoseofds.com

A Simple One-Liner to Create Professional Looking Matplotlib Plots

Improve the default styling of Matplotlib.

Avi Chawla
Apr 23, 2023
6
Share

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 plt
plt.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.

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (250+ pages) with 200+ tips.

👉 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!

Share Daily Dose of Data Science


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.

6
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing