📜  networkx 用权重绘制图形 - Python 代码示例

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

代码示例1
pos = nx.spring_layout(G)
nx.draw_networkx(G, pos, with_labels=True, font_weight='bold')
labels = nx.get_edge_attributes(G, 'weight')
nx.draw_networkx_edge_labels(G, pos, edge_labels=labels)