[英]How to add labels to nodes in a CIRCULAR GRAPH with networkx in python
將draw_networkx_labels()
函數與nx.circular_layout()
pos nx.circular_layout()
:
G = nx.Graph()
e = [(0, 1), (0, 2)]
G.add_edges_from(e)
pos = nx.circular_layout(G)
nx.draw_networkx_labels(G, pos)
nx.draw_circular(G, node_color='#2ea28a', node_size=1000)
plt.show()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.