Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson7_2

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • lesson7_2
  • diy4.py
Find file
BlameHistoryPermalink
  • BellCodeEditor's avatar
    auto save · 5fe13965
    BellCodeEditor committed 3 years ago
    5fe13965
diy4.py 606 Bytes
Edit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from pyecharts.charts import Line
test = ["第1次","第2次","第3次","第4次","第5次","第6次","第7次","第8次","第9次","第10次"]
student1 = [112,120,110,124,129,132,136,139,144,143]
student2 = [128,131,132,129,130,127,129,131,132,128]
student3 = [143,145,140,133,134,126,112,120,114,105]

#创建折线图对象
line = Line()
#传入数值
line.add_xaxis(test)
line.add_yaxis("小贝",student1)
line.add_yaxis("悟空",student2)
line.add_yaxis("八戒",student3)
line.set_global_opts(title_opts={"text":"成绩走势图","subtext":"高254班数学"})
line.render("test.html")