import webbrowser
from pyecharts import options as opts
from pyecharts.charts import Graph
nodes = [
opts.GraphNode(name="结点1", symbol_size=10),
opts.GraphNode(name="结点2", symbol_size=20,symbol="diamond"),
opts.GraphNode(name="结点3", symbol_size=30,symbol="roundRect"),
opts.GraphNode(name="结点4", symbol_size=40),
opts.GraphNode(name="结点5", symbol_size=200, label_opts = opts.LabelOpts(font_size=50, position="inside",color="yellow")),
]
links = [
opts.GraphLink(source="结点1", target="结点2",symbol_size=30,linestyle_opts=opts.LineStyleOpts(color="green")),
opts.GraphLink(source="结点2", target="结点3"),
opts.GraphLink(source="结点3", target="结点4"),
opts.GraphLink(source="结点4", target&
pyecharts Graph关系图示例
最新推荐文章于 2024-07-11 15:25:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)