Matplotlib 2 堆叠子图,无法设置两个 ytick 标签的大小

Matplotlib 2 stacked subplots, unable to set size of BOTH ytick labels

我的代码:

import matplotlib.pyplot as plt
fig, axs = plt.subplots(2, sharey=False)
axs[0].plt(stuff)
axs[1].plt(stuff)

我试过:

plt.yticks(fontsize=15)

plt.tick_params(axis='both', which='major', labelsize=15)

他们都改变了下图中ytick标签的大小,但上图保持不变。我一直没能抓住上面的子图 ytick 标签句柄。

感谢@ImportanceOfBeingErnest!

axs[0].tickparams()

这只抓住了上面子图的句柄。