chevron_left
Customizing Plots Cookbook
0
0
0
new
Changing the plot style in Matplotlib
Programming
chevron_rightPython
chevron_rightMatplotlib
chevron_rightCookbooks
chevron_rightCustomizing Plots Cookbook
schedule Jul 1, 2022
Last updated Python●Matplotlib
Tags tocTable of Contents
expand_more 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?
Ask a question or leave a feedback...
0
0
0
Enjoy our search