Reputation: 503
I am trying to make histograms for a dataframe with pandas 0.11.0
but the figure size is too small. How to change it?
In pandas 0.19.0
, hist
has the figsize
parameter.
Upvotes: 31
Views: 47538
Reputation: 23041
As mentioned in the OP, since pandas 0.15.0, df.hist(figsize=(15, 20))
or df.plot(kind='hist', figsize=(15, 20))
is possible. Another way is to create a subplot and set figure size.
fig, ax = plt.subplots(1, figsize=(15, 20))
df.plot(kind='hist', ax=ax);
Upvotes: 1
Reputation: 153460
Let's try something like this:
fig = plt.figure(figsize = (15,20))
ax = fig.gca()
df.hist(ax = ax)
Upvotes: 77