仁爱舞蹈

文章
5
资源
0
加入时间
3年0月8天

networkx绘制简单图

# #!-*- coding:utf8-*-# import scipy as sp# import scipy.sparse # call as sp.sparseimport networkx as nximport matplotlib.pyplot as pltprint(nx.__version__)G = nx.Graph()G.add_edge(5, 1, weight=7)G.add_edge(5, 3, weight=8)G.add_edge(1, 2, weig