ticklabel

2019-01-01  本文已影响7人  榴莲气象

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)


参考

上一篇下一篇

猜你喜欢

热点阅读