用户:青柠学长查看:0 回复:0 评论:0 创建时间:2022-02-10T10:05:30
【作品展示】

【作品介绍】
【作品源代码】
from pyecharts import Radar
import webbrowser
import json
import os
with open("sprites.json",encoding="utf-8") as f:
sprites = json.load(f)
print(sprites)
sprites_property = [
sprites["熔岩龙"]["生命"],
sprites["熔岩龙"]["攻击"],
sprites["熔岩龙"]["特攻"],
sprites["熔岩龙"]["速度"],
sprites["熔岩龙"]["防御"],
sprites["熔岩龙"]["特防"],
]
mao_schema = [
{"name": "生命", "max": 800},
{"name": "攻击", "max": 300},
{"name": "特攻", "max": 300},
{"name": "速度", "max": 300},
{"name": "防御", "max": 300},
{"name": "特防", "max": 300},
]
chart = Radar("精灵属性图谱")
chart.config(c_schema = mao_schema)
chart.add("熔岩龙", [sprites_property])
chart.render()
webbrowser.open("file://" + os.path.realpath("render.html"))
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn