Position nodes uniformly at random in the unit square.
For every node, a position is generated by choosing each of dim coordinates uniformly at random on the interval [0.0, 1.0).
NumPy (http://scipy.org) is required for this function.
Parameters : | G : NetworkX graph
dim : int
|
---|---|
Returns : | dict : :
|
Examples
>>> G = nx.lollipop_graph(4, 3)
>>> pos = nx.random_layout(G)