Created
May 15, 2019 12:19
-
-
Save Trevol/0d154001a8c781cbdb8d2ea4490455a2 to your computer and use it in GitHub Desktop.
Matplotlib.pyplot: on/off ticks, labels and tune other tick params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
plt.plot(range(10)) | |
plt.tick_params( | |
axis='x', # changes apply to the x-axis | |
which='both', # both major and minor ticks are affected | |
bottom=False, # ticks along the bottom edge are off | |
top=False, # ticks along the top edge are off | |
labelbottom=False) # labels along the bottom edge are off | |
plt.show() | |
plt.savefig('plot') | |
plt.clf() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment