HS300_new=pd.read_excel("C:/Users/沪深300指数(2016-2018).xlsx",
sheet_name='Sheet1',header=0,index_col=0)
plt.figure(figsize=(11,9),frameon=True)
plt.Subplot(2,2,1)
plt.plot(HS300_new['开盘点位'],'r-',label=u'沪深300开盘点位',lw=2)
plt.xticks(fontsize=13,rotation=30)
plt.xlabel(u'日期',fontsize=13)
plt.yticks(fontsize=13)
plt.ylabel(u'点位',fontsize=13)
plt.legend(loc=0,fontsize=13)
plt.grid()
plt.Subplot(2,2,2)
plt.plot(HS300_new['最高点位'],'b-',label=u'沪深300最高点位',lw=2)
plt.xticks(fontsize=13,rotation=30)
plt.xlabel(u'日期',fontsize=13)
plt.yticks(fontsize=13)
plt.ylabel(u'点位',fontsize=13)
plt.legend(loc=0,fontsize=13)
plt.grid()
plt.Subplot(2,2,3)
plt.plot(HS300_new['最低点位'],'c-',label=u'沪深300最低点位',lw=2)
plt.xticks(fontsize=13,rotation=30)
plt.xlabel(u'日期',fontsize=13)
plt.yticks(fontsize=13)
plt.ylabel(u'点位',fontsize=13)
plt.legend(loc=0,fontsize=13)
plt.grid()
plt.Subplot(2,2,4)
plt.plot(HS300_new['收盘点位'],'k-',label=u'沪深300收盘点位',lw=2)
plt.xticks(fontsize=13,rotation=30)
plt.xlabel(u'日期',fontsize=13)
plt.yticks(fontsize=13)
plt.ylabel(u'点位',fontsize=13)
plt.legend(loc=0,fontsize=13)
plt.grid()
只出现一个没有线的空图
出现四张折现子图
transSubfigure这个在哪里呢。报错讲的是int类型没有这个属性,检查一下调用transSubfigure的类型