Position nodes using Fruchterman-Reingold force-directed algorithm.
Parameters : | G : NetworkX graph dim : int
pos : dict or None optional (default=None)
fixed : list or None optional (default=None)
iterations : int optional (default=50)
weight : string or None optional (default=’weight’)
scale : float
|
---|---|
Returns : | dict : :
|
Examples
>>> G=nx.path_graph(4)
>>> pos=nx.spring_layout(G)
# The same using longer function name >>> pos=nx.fruchterman_reingold_layout(G)