Position nodes using Fruchterman-Reingold force-directed algorithm.
Parameters: | G : NetworkX graph dim : int
pos : dict
fixed : list
iterations : int
weighted : boolean
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)