scale_free_graph(n, alpha=0.41, beta=0.54, gamma=0.05, delta_in=0.2, delta_out=0, create_using=None, seed=None)
The sum of alpha
, :None:None:`beta`
, and :None:None:`gamma`
must be 1.
Number of nodes in graph
Probability for adding a new node connected to an existing node chosen randomly according to the in-degree distribution.
Probability for adding an edge between two existing nodes. One existing node is chosen randomly according the in-degree distribution and the other chosen randomly according to the out-degree distribution.
Probability for adding a new node connected to an existing node chosen randomly according to the out-degree distribution.
Bias for choosing nodes from in-degree distribution.
Bias for choosing nodes from out-degree distribution.
The default is a MultiDiGraph 3-cycle. If a graph instance, use it without clearing first. If a graph constructor, call it to construct an empty graph.
Indicator of random number generation state. See Randomness<randomness>
.
Returns a scale-free directed graph.
>>> G = nx.scale_free_graph(100)See :
The following pages refer to to this document either explicitly or contain code examples using this.
networkx.generators.directed.scale_free_graph
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them