#关系可视化
from pyecharts import options as opts
from pyecharts.charts import Graph
from pyecharts.globals import ThemeType
import webbrowser
#生成大量节点
nodes=[]
for i in range(20):
#node={"name":"节点"+str(i),"symbolsize":20}
node=opts.GraphNode(name="节点"+str(i), #节点名称 ★ 不能有重名!
symbol_size=10+i, #节点大小
symbol='image://cat_brown.svg' #★★★★★ 节点样式可选:'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow', 'none', 'image://url'
)
nodes.append(node)
#节点间连接线样式设置
linestyle_opts=opts.LineStyleOpts(is_show=True,
width=1,
Pyecharts Graph 关系图示例
最新推荐文章于 2024-01-28 12:15:00 发布