layout_forceatlas2: ForceAtlas2 force-directed layout

Description Usage Arguments Value References

View source: R/forceatlas2.R

Description

ForceAtlas2 force-directed layout

Usage

 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
)

Arguments

G

The input igraph object. The graph must have an edge attribute named weight, representing edge weights

ew.influence

Edge weight influence. The edge weights are set to edge.weight ^ ew.influence before the calculation (see original ForceAtlas2 publication)

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 stopping.tolerance threshold (see below)

prevent.overlap

Set this option to TRUE to prevent the nodes from overlapping (see ForceAtlas2 description)

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 NULL (default), no nodes are held fixed

stopping.tolerance

The algorithm will stop after either iter number of iterations, or when the average displacement of the nodes between two iterations is less than this threshold

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

Value

this function returns a list with three elements

References

http://gephi.github.io

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


ParkerICI/scgraphs documentation built on April 30, 2021, 1:10 p.m.