【发布时间】:2014-04-03 20:08:32
【问题描述】:
我对 pandas 绘图设施很陌生,在文档中,以下命令非常方便:
myplot = rts.ret.hist(bins=50, by=rts.primary_mic)
但是,当我尝试从绘图中获取图形参考并保存时,问题就来了:
myfigure = myplot.get_figure()
AttributeError: 'numpy.ndarray' object has no attribute 'get_figure'
我的理解是, rts.ret.hist(bins=50) 返回一个绘图对象,而 rts.ret.hist(bins=50 返回一个数组对象。
在这种情况下我应该如何保存我的身材?
有什么线索吗?
谢谢!
【问题讨论】:
-
试试
myplot[0].get_figure()