for i, y in enumerate(yn):
    ax = fig.add_subplot(len(yn), 1, i + 1)
ax.plot(x, y, ls='solid', color=COLORS[i])
if i != len(yn) - 1:
    ax.set_xticklabels(())
else:
    for tick in ax.xaxis.get_major_ticks():
        tick.label.set_fontsize(14)
tick.label.set_rotation('vertical')
fig.suptitle('Matplotlib xticklabels Example')
plt.show()
if __name__ == '__main__':
    xticklabels_example()
Matplotlib make tick labels font size smaller