chevron_left
Customizing Plots Cookbook
thumb_up
0
thumb_down
0
chat_bubble_outline
0
auto_stories new
settings
Removing grid lines in Matplotlib
Programming
chevron_rightPython
chevron_rightMatplotlib
chevron_rightCookbooks
chevron_rightCustomizing Plots Cookbook
schedule Jul 1, 2022
Last updated local_offer Python●Matplotlib
Tags tocTable of Contents
expand_more To remove grid lines in Matplotlib, use the plt.grid(~)
method and pass False
argument.
fig, ax = plt.subplots()ax.plot([1,2,3])ax.grid(False)plt.show()
This produces the output:

Join our newsletter for updates on new DS/ML comprehensive guides (spam-free)
Published by Arthur Yanagisawa
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!