如何为 Pandas 0.11.0 增加 Dataframe.hist 的图形大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43392588/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to Increase the figure size of Dataframe.hist for pandas 0.11.0
提问by AbhiGupta
I am trying to make histograms for all columns of a dataframe through pandas 0.11.0 but the figure size is very small and hence the histograms are coming even smaller. We have the figsize property in 0.19.0 but how can we achieve the same in 0.11.0.
我正在尝试通过 pandas 0.11.0 为数据帧的所有列制作直方图,但图形大小非常小,因此直方图变得更小。我们在 0.19.0 中有 figsize 属性,但是我们如何在 0.11.0 中实现相同的属性。
回答by Scott Boston
Let's try something like this:
让我们尝试这样的事情:
fig = plt.figure(figsize = (15,20))
ax = fig.gca()
df.hist(ax = ax)