networkx color nodes code example
Example: nx draw with labels
import networkx as nx
import matplotlib.pyplot as plt
G=nx.Graph()
# Add nodes and edges
G.add_edge("Node1", "Node2")
nx.draw(G, with_labels=True)
import networkx as nx
import matplotlib.pyplot as plt
G=nx.Graph()
# Add nodes and edges
G.add_edge("Node1", "Node2")
nx.draw(G, with_labels=True)