猫史档案馆


【Python作品分享】新的作品-40【教程贴】

用户:CRBDTCRBDT查看:10 回复:0 评论:0 创建时间:2020-03-13T20:50:51


【作品展示】

center_image

 

【作品介绍】

喵,喵,喵纯属瞎编

 

【作品源代码】

import json
import webbrowser
import os
from pyecharts import Bar
with open('birthday.json','r') as f:
    abc=json.load(f)
a=[0]*12
for i in abc:
    a[int(i)-1]+=1
x_axis=['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']
y_axis=a
bar=Bar('birthday')
bar.add(' ',x_axis,y_axis)
bar.render()
webbrowser.open('file://'+os.path.realpath('r'))

 

【提示】

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

https://python.codemao.cn


回复

上一页第 1 页 / 共 0 页下一页