跳到主要内容
NEUSNCP / 知识空间

博客

发现有价值的观点,记录自己的思考。

写博客
盼盼

复杂网络之Networkx

1:数据构造 新建excel表格,输入邻接矩阵: 第一行代表边:a-b ,a-c, a-d三条有向边 其余各行以此类推。 完成数据后,将excel表格另存为.txt文件,随后保存为relation.adjlist即可。 2:读取文件及可视化 import networkx as nx import matplotlib.pyplot as plt #G = nx.read_adjlist(config/relation.adjlist)#默认无向图 G = nx.read_adjlist(config/re...