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 ),