I\'m new to networkx and need some help. I\'ve searched previously and couldn\'t resolve my issue. I have a networkx graphviz image I made, using a list as input for the nod
THanks, sophiad for your reply. It seems the answer I was looking for was right in from of my nose the whole time. I needed to make a list of the colors to pass to nx.draw_graphviz.
So, the correct code (that I found) to pass a certain color to a node comparing two lists:
colors=[]
for n in nodes:
if n in hybrids:
colors.append('g')
else:
colors.append('b')
nx.draw_graphviz(g, prog="fdp", node_color = colors, node_size = sizes)
And for changed the text version, to mirror the color node version, all I had to do was change A.layout() to A.layout(prog="fdp")
And it does not change the layout!
The original image:

The new image:

The new text version: