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,196
  • 3
  • 21
  • 24

1 Answers1

3

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,860
  • 1
  • 11
  • 17