pyecharts简单绘制关系图
import json
from pyecharts
.charts
import Graph
import pyecharts
.options
as opts
with open('D:\ChromeCoreDownloads\weibo.json', encoding
='utf-8') as f
:
j
= json
.load
(f
)
nodes
,links
,categories
,cont
,mid
,user1
=j
Graph
(init_opts
=opts
.InitOpts
(width
='1800px',height
='800px')).add
('graph', nodes
=nodes
,links
=links
,categories
=categories
,label_opts
=opts
.LabelOpts
(is_show
=False)).render
()
###结果图
转载请注明原文地址:https://ipadbbs.8miu.com/read-55100.html