apaGraph.Layout.ForceAtlas2.AllParams(Edges, UseWeightsOtherwiseUnitWeights, SpringLength, Epsilon, RepulsionStrength, Iterations, Gravity, StrongGravityMode, OutboundAttractionDistribution, LinLogMode, PreventOverlap, NodeSize, InitialSpeed, InitialSpeedEfficiency)
=apaGraph.Layout.ForceAtlas2.AllParams(Edges, UseWeightsOtherwiseUnitWeights, SpringLength, Epsilon, RepulsionStrength, Iterations, Gravity, StrongGravityMode, OutboundAttractionDistribution, LinLogMode, PreventOverlap, NodeSize, InitialSpeed, InitialSpeedEfficiency)Result
ForceAtlas2 layout of an edge list with an extended parameter set. Returns a layout matrix with the node index in the first column and the X/Y coordinates in the next two columns.
Syntax
Edges: n x 3 edge list, the first two columns containing the node indices, the third column the distance between the two nodes (smaller = closer, e.g. sqrt(2(1-ρ)) for correlations ρ)
UseWeightsOtherwiseUnitWeights: TRUE to use the third column as edge distances, so that more similar nodes are placed closer together; FALSE to use unit distances
SpringLength: spring length (scaling ratio). Default value: 1
Epsilon: convergence tolerance. Default value: 0.0001
RepulsionStrength: repulsion strength. Default value: number of nodes
Iterations: maximum number of iterations. Default value: 500 times the number of nodes
Gravity: gravity strength, i.e. attraction towards the center. Default value: 1
StrongGravityMode: TRUE to use the strong gravity mode, FALSE otherwise. Default value: FALSE
OutboundAttractionDistribution: TRUE to distribute the attraction by outbound mass, FALSE otherwise. Default value: FALSE
LinLogMode: TRUE to use the lin-log attraction mode, FALSE otherwise. Default value: FALSE
PreventOverlap: TRUE to reduce node overlap, FALSE otherwise. Default value: FALSE
NodeSize: node size used when overlap prevention is enabled. Default value: 0
InitialSpeed: initial speed. Default value: 1
InitialSpeedEfficiency: initial speed efficiency. Default value: 1
Algorithm
Nodes repel each other proportionally to their degree, connected nodes attract each other and gravity pulls all nodes towards the center.
In weighted mode, the distances are divided by their median and clipped to [0.05, 20]; the attraction along an edge is proportional to 1/distance. Duplicate edges keep the shortest distance.
Remarks
Non-positive values of RepulsionStrength and Iterations are replaced by their default values.
Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."
