label size
import matplotlib.pyplot as plt
We prepare the plot
fig = plt.figure(1)
We define a fake subplot that is in fact only the plot.
plot = fig.add_subplot(111)
We change the fontsize of minor ticks label
plot.tick_params(axis='both', which='major', labelsize=10)
plot.tick_params(axis='both', which='minor', labelsize=8)
To specify both font size and rotation at the same time, try this:
plt.xticks(fontsize=14, rotation=90)
网友评论