用户:
我乃老D张查看:2 回复:1 评论:2 创建时间:2020-07-21T21:49:17
【作品展示】

【作品介绍】
一个海底食物链
【作品源代码】
from pyecharts import Funnel
import webbrowser,os
import json
with open('foodchain.json','r')as f:
data=json.load(f)
print(type(data),data)
funnel=Funnel('海底食物链')
name=''
x_axis=list(data.keys())
y_axis=[5,4,3,2,1]
print(x_axis,y_axis)
funnel.add(name, x_axis, y_axis, funnel_sort='aescending', is_label_show=True)
funnel.render()
webbrowser.open('file://'+os.path.realpath('render.html'))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn