diff options
author | Dan Schult <dschult@colgate.edu> | 2021-05-20 01:31:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 22:31:41 -0700 |
commit | dbe1d74db811ed13cc7d53ce571c7bbfefa8de4a (patch) | |
tree | 5ce6e67ba35acf00f4258cf8b17951fba82265b1 | |
parent | 021b318c8912096fab68a44ac7f4ceee315e2590 (diff) | |
download | networkx-dbe1d74db811ed13cc7d53ce571c7bbfefa8de4a.tar.gz |
switch alias direction of spring_layout and fruchterman_reingold_layout (#4820)
-rw-r--r-- | networkx/drawing/layout.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/networkx/drawing/layout.py b/networkx/drawing/layout.py index 474556f0..b7637ece 100644 --- a/networkx/drawing/layout.py +++ b/networkx/drawing/layout.py @@ -343,7 +343,7 @@ def bipartite_layout( @random_state(10) -def fruchterman_reingold_layout( +def spring_layout( G, k=None, pos=None, @@ -401,7 +401,8 @@ def fruchterman_reingold_layout( weight : string or None optional (default='weight') The edge attribute that holds the numerical value used for - the edge weight. If None, then all edge weights are 1. + the edge weight. Larger means a stronger attractive force. + If None, then all edge weights are 1. scale : number or None (default: 1) Scale factor for positions. Not used unless `fixed is None`. @@ -494,7 +495,7 @@ def fruchterman_reingold_layout( return pos -spring_layout = fruchterman_reingold_layout +fruchterman_reingold_layout = spring_layout @random_state(7) |