chevron_left
Customizing Plots Cookbook
check_circle
Mark as learned thumb_up
0
thumb_down
0
chat_bubble_outline
0
auto_stories new
settings
Changing the plot style in Matplotlib
Matplotlib
chevron_rightCookbooks
chevron_rightCustomizing Plots Cookbook
schedule Jul 1, 2022
Last updated local_offer Python●Matplotlib
Tags tocTable of Contents
expand_more Check out the interactive map of data science
To change the plot style in Matplotlib use the the plt.style.use(~)
method.
Examples
To use the ggplot
style from the R library:
plt.style.use("ggplot")
NOTE
Once you apply a style, it will be used for all figures created during the session unless changed.
To check all the different styles available in Matplotlib, visit the official documentation.
Resetting plot style
To reset plt.style
in Matplotlib to the default, use:
plt.style.use("default")
This will give you back the plain old styling.
Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
thumb_up
thumb_down
Ask a question or leave a feedback...
thumb_up
0
thumb_down
0
chat_bubble_outline
0
settings
Enjoy our search
Hit / to insta-search docs and recipes!