原文链接: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

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



