Python错误集锦:pandas绘制多个子图时报错:AttributeError: ‘list’ object has no attribute ‘get_figure’

原文链接:http://www.juzicode.com/archives/3273

 

错误提示:

利用pandas绘制多个子图时报错:AttributeError: ‘list’ object has no attribute ‘get_figure’

#juzicode.com #vx:桔子code
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.rc('font',family='Youyuan',size='11')  
plt.rc('axes',unicode_minus='False')

t = np.arange(0, 10, 0.1)  #100行,用作index
s = np.random.randn(100,5) #100行5列的随机数据
df = pd.DataFrame(s, index=t,columns=['A1','B2','C3','D4','E4'])
df = df.cumsum() #累加

fig,axes=plt.subplots(3,3,figsize=(10,10))
group = [axes[0][0], axes[0][2], axes[1][1], axes[2][0], axes[2][2]]  
df.plot(title='随机曲线 by桔子code',  ax=group) 
plt.show()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-29-5b24a5692d3e> in <m
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值