Reputation: 354
I have a simple configuration model, and I would like to change the size of nodes in the graph.
My code is:
import networkx as nx
import matplotlib.pyplot as plt
hosts = 100
H=nx.configuration_model([2]*hosts)
nx.draw_random(H)
I tried including node_size but this is undefined and I receive the error:
TypeError: configuration_model() got an unexpected keyword argument 'node_size'
How do I change the size of my nodes?
Many thanks.
Upvotes: 0
Views: 196
Reputation: 566
Use node_size
parameter in draw_random
nx.draw_random(H, node_size=100)
Upvotes: 1