Reputation: 4969
I'm trying to set size of pandas histogram when saving to a file. I go about this like that:
fig = df_analyze.hist();
fig.set_size_inches(16,12)
plt.savefig('hist.png')
But this doesn't work. What is the correct syntax?
Upvotes: 0
Views: 2143
Reputation: 4969
Setting
rcParams['figure.figsize'] = 16, 12
before calling df_analyze.hist()
does the job. So, the full solution reads:
rcParams['figure.figsize'] = 16, 12
df_analyze.hist()
plt.savefig('hist.png')
Upvotes: 2