ts_tool.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pyktrader2 作者: harveywwu 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号