2021-01-31

from matplotlib import pyplot as plt
import networkx as nx
G=nx.Graph()
G.add_nodes_from([1,2,3])
G.add_edges_from([(1,2),(1,3)])
nx.draw_networkx(G)
plt.show()
2021-01-31
from matplotlib import pyplot as plt
import networkx as nx
G=nx.Graph()
G.add_nodes_from([1,2,3])
G.add_edges_from([(1,2),(1,3)])
G.add_edges_from([(2,3),(1,2)])
nx.draw_networkx(G)
plt.show()
2021-01-31

CSDN搜索:Python Networkx基础知识及使用总结

上一篇:networkx学习与使用——(6)图划分与介数计算


下一篇:python学习(32)---networkx