plotter.py 文件源码

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

项目:trafficjuggler 作者: Pavel-Polyakov 项目源码 文件源码
def getFigureByXY(x,y):
    ylabel='\nOutput, MBps'
    fig = Figure(figsize=(16,6), dpi=120)
    axis = fig.add_subplot(1, 1, 1)
    axis.plot(x, y, color='#2b8ef9')
    axis.fill_between(x,y, facecolor='#2b8ef9')
    axis.grid(True)
    axis.set_ylim(bottom=0)
    axis.set_ylabel(ylabel)
    # axis.set_xlabel('\n%s - %s' % (x[0],x[-1]))
    axis.xaxis.set_major_formatter(dates.DateFormatter('%H:%M'))
    axis.xaxis.set_major_locator(dates.HourLocator(byhour=range(0,24,1)))
    fig.autofmt_xdate()
    fig.set_facecolor('white')
    return fig
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号