How to set colors for nodes in NetworkX?

后端 未结 2 878
南方客
南方客 2020-12-02 15:27

I created my graph, everything looks great so far, but I want to update color of my nodes after creation.

My goal is to visualize DFS, I will first show the initial

2条回答
  •  离开以前
    2020-12-02 16:22

    Refer to node_color parameter:

    nx.draw_networkx_nodes(G, pos, node_size=200, node_color='#00b4d9')
    

提交回复
热议问题