def plot_series(ts):
#months = mdates.MonthLocator() # every month
fig, ax = plt.subplots()
ax.plot(ts.index, ts, label=ts.name)
#ax.xaxis.set_major_locator(months)
#ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %Y'))
#ax.set_xlim(datetime.datetime(2012, 1, 1), datetime.datetime(2013, 1, 1))
ax.grid(True)
fig.autofmt_xdate()
plt.xlabel('Month/Year')
plt.ylabel('Price ($)')
plt.title('Residual Plot')
plt.legend()
plt.plot(ts)
plt.show()
评论列表
文章目录