搜索
您的当前位置:首页正文

ticklabel

来源:二三娱乐

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)


Top