【发布时间】:2020-07-20 11:26:29
【问题描述】:
我有这个功能,我想改变图形的大小,但是无论我在 figsize 中输入什么值,图形大小都不会改变。任何人都可以建议有什么问题吗?或者是否有其他方法可以做到这一点?
def plot_comparison_barplots(df, bar_col, hue_col, scaled):
fig = plt.figure(figsize=(12,10))
fig.set_tight_layout(True)
plt.rcParams.update({'font.size': 9})
ax = sns.catplot(x=bar_col, y='count in %', data=df, hue=hue_col, kind='bar', order=scaled)
【问题讨论】:
-
您能否提供一些样本数据,使您的问题可重现?
-
添加数据为例
标签: python matplotlib plot seaborn figsize