plots.py 文件源码

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

项目:ee-atmcorr-timeseries 作者: samsammurphy 项目源码 文件源码
def plot_timeseries(DF, ax, name, startDate, stopDate, ylim=False):
    """
    plots timeseries graphs
    """

    # original time series
    ax.plot(DF[name],color='#1f77b4')
    ax.set_ylabel(name)
    ax.set_ylim(ylim)
    ax.set_xlim(pd.datetime.strptime(startDate,'%Y-%m-%d'),\
                pd.datetime.strptime(stopDate,'%Y-%m-%d'))

    # boxcar average
    ax.plot(DF[name].rolling(180).mean(),color='red')

    # make the dates exact
    ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号