5

I am trying to change the figure size of the histogram I am constructing. I'm getting the error:

distplot() got an unexpected keyword argument 'figsize'

The code I am trying to run is this:

sns.distplot(MSoft['pct_change'].dropna(), bins=100, color='magenta', figsize=(20,8))
error
  • 2,356
  • 3
  • 23
  • 25

1 Answers1

4

You need to change the size of figure, on which plot is drawn -

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)
Aritesh
  • 1,985
  • 1
  • 13
  • 17