📜  networkx 绘图图显示标签 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:16.190000             🧑  作者: Mango

代码示例1
import networkx as nx
import pylab as plt

G=nx.Graph()
# Add nodes and edges
G.add_edge("Node1", "Node2")
nx.draw(G, with_labels = True)
plt.savefig('labels.png')