Home   >   User Resources   >   Online Help   >   apaGraph.Layout.ForceDirected
 

 

Function index Version 3.0.0

apaGraph.Layout.ForceDirected(Edges, IsWeighted)

Excel=apaGraph.Layout.ForceDirected(Edges, IsWeighted)

Result

Force-directed layout of a graph defined by an edge list. Returns a 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 ρ)

IsWeighted: TRUE to use the third column as edge distances, so that more similar nodes are placed closer together; FALSE to use unit distances

Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."