distplot()得到了一个意外的关键字参数'figsize'

6

我正在尝试更改我正在构建的直方图的图形大小.我收到错误:

distplot() got an unexpected keyword argument 'figsize'
Run Code Online (Sandbox Code Playgroud)

我试图运行的代码是这样的:

sns.distplot(MSoft['pct_change'].dropna(), bins=100, color='magenta', figsize=(20,8))
Run Code Online (Sandbox Code Playgroud)

Ari*_*esh 5

您需要更改绘制绘图的图形的大小 -

sns.set_style('ticks')
fig, ax = plt.subplots()
fig.set_size_inches(10, 6)
sns.distplot(MSoft['pct_change'].dropna(), bins=100, color='magenta', ax=ax)
Run Code Online (Sandbox Code Playgroud)