我正在尝试放大 x 轴标签(即“陆上”、“海上”和“太阳能”),同时旋转它们。但是每当我增加大小时,我的 cat 子图的列大小就会减小并压缩图像。有没有办法在不减少/压缩 seaborn catplot 中的子图的情况下增加轴标签的字体大小?
这是我的代码:
#plt.subplots(figsize=(28,12))
sns.set_theme(style = "whitegrid", font_scale= 1.9)
ax = sns.catplot(x="generator", y="ELCC", hue="Nameplate Capacity",
col="Scenario", aspect=.7,
kind="box",palette = 'RdYlBu', data=final_df)
plt.legend(bbox_to_anchor = (1, 1))
ax.set_xticklabels(rotation = 30)
ax.set_xlabels('Generator Type', fontsize=20) # not set_label
ax.set_ylabels('ELCC', fontsize= 20)
ax.fig.set_size_inches(45,22)
plt.show()