猫史档案馆


【Python作品分享】sy05【作品秀】

用户:智D智D查看:0 回复:0 评论:0 创建时间:2021-01-27T12:14:36


【作品展示】

center_image

 

【作品介绍】

1

 

【作品源代码】

from pyecharts import options as opts
from pyecharts.charts import Bar

bar=Bar()

bar.set_global_opts(
xaxis_opts=opts.AxisOpts(name='水的用途'),
yaxis_opts=opts.AxisOpts(name='水量(单位/吨)'),
title_opts=opts.TitleOpts(title='2019年6月用水分布'))

bar.add_xaxis(['饮用水','实验用水','打水仗','清洁用水'])
bar.add_yaxis('阿短',[20,50,10,80])
bar.add_yaxis('编程猫', [15, 10, 30, 1])

bar.render('2019年6月用水分布.html')


from pyecharts.charts import Line
line=Line()

line.set_global_opts(
xaxis_opts=opts.AxisOpts(name='水的用途'),
yaxis_opts=opts.AxisOpts(name='水量(单位/吨)'),
title_opts=opts.TitleOpts(title='2019年6月用水情况'))

line.add_xaxis(['1月', '2月', '3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'])
line.add_yaxis('阿短', [10,60,60 ,77 ,44,23,58,15,54,67,75,12])
line.add_yaxis('编程猫', [15, 10, 30, 63,45,87,35,24,31,54,10,21,45])



line.render('2019年6月用水情况.html')

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页