I am trying to plot a graph and color nodes in a loop. So far, the
for-loop I am using can color them. But, I am able to color them using a
single color. I want to color the nodes differently for each iteration of
the for-loop. How do I do that?
My code so far:
nx.draw(G,pos, node_color='w', edge_color='k',
# Now, begin updating by coloring nodes and edges
for i,nlist in enumerate(MIS_levels):
# update-color each level nodes
if i < len(elist):
The above code colors the nodes blue and the edges r. I want to options:
1 --- For each iteration, I want the nodes to be colored in diminishing
shade (like Red_r).
2 --- For each iteration, I want a separate coloring of the nodes.
Any ideas, suggestions are very much appreicated.