Question : change tick labelsize matplotlib
Answered by : kiril-klein
import matplotlib.pyplot as plt
# We prepare the plot
fig, ax = plt.subplots()
# We change the fontsize of minor ticks label
ax.tick_params(axis='both', which='major', labelsize=10)
ax.tick_params(axis='both', which='minor', labelsize=8)
Source : https://stackoverflow.com/questions/6390393/matplotlib-make-tick-labels-font-size-smaller | Last Update : Tue, 05 Apr 22
Question : matplotlib turn off ticks
Answered by : kiril-klein
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()
Source : https://stackoverflow.com/questions/12998430/remove-xticks-in-a-matplotlib-plot | Last Update : Mon, 25 Apr 22