Description Usage Arguments Value References
ForceAtlas2 force-directed layout
1 2 3 4 5 6 7 8 9 10 | layout_forceatlas2(
G,
ew.influence = 1,
kgrav = 1,
iter = 1000,
prevent.overlap = FALSE,
fixed = NULL,
stopping.tolerance = 0.001,
barnes.hut = FALSE
)
|
G |
The input |
ew.influence |
Edge weight influence. The edge weights are set to |
kgrav |
The gravity constant. Higher values will result in more compact graphs (see original ForceAtlas2 publication) |
iter |
Maximum number of iterations. The algorithm will stop after this
many iterations, or when the average displacement of the nodes between two
iterations is less than the |
prevent.overlap |
Set this option to |
fixed |
A boolean vector of length equal to the number of nodes in the
graph which specifies which nodes, need to be held in a fixed
position. If this is |
stopping.tolerance |
The algorithm will stop after either |
barnes.hut |
Whether to use the Barnes-Hut approximation for speeding up the calculations when dealing with large graphs. This option is automatically set to true when the graph has more than 2000 nodes |
this function returns a list with three elements
lay
: a numeric matrix with two columns containing the x and y coordinates of each node in the final
layout
avg.displ
: a numeric vector containing the average displacement of the vertices at each iteration
max.displ
: a numeric vector containing the maximum displacement between all the vertices after
each iteration
Jacomy M1, Venturini T, Heymann S, Bastian M. ForceAtlas2, a continuous graph layout algorithm for handy network visualization designed for the Gephi software. PLoS One. 2014 Jun 10;9(6):e98679. doi: 10.1371/journal.pone.0098679
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.