I have a large graph of nodes and directed edges. Furthermore, I have an additional list of values assigned to each node.
I now want to change the color of each node according to their node value. So e.g., drawing nodes with a very high value red and those with a low value blue (similar to a heatmap). Is this somehow easily possible to achieve? If not with networkx, I am also open for other libraries in Python.
yields
The numbers in
values
are associated with the nodes inG.nodes()
. That is to say, the first number invalues
is associated with the first node inG.nodes()
, and similarly for the second, and so on.