欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

9.pyecharts折线图-----实例

程序员文章站 2022-05-26 21:32:38
...
import pyecharts.options as opts
from pyecharts.charts import Line

low = [4000,5000,6000,5500,3000,4500]

line = Line()
line.add_xaxis(lab)
line.add_yaxis("步数",low,
               markpoint_opts=opts.MarkPointOpts(data=[opts.MarkPointItem(type_='min',name="最低步数")]),
               markline_opts=opts.MarkLineOpts(data=[opts.MarkLineItem(type_="average",name="平均值")])
              )
line.add_yaxis("步数",low,
               markpoint_opts=opts.MarkPointOpts(data=[opts.MarkPointItem(type_='max',name="最高步数")]),
               markline_opts=opts.MarkLineOpts(data=[opts.MarkLineItem(type_="average",name="平均值")])
              )
line.set_global_opts(xaxis_opts=opts.AxisOpts(name="日期",
                                             axisline_opts=opts.AxisLineOpts(is_on_zero=False ),