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

 

Function index Version 3.0.0

apaGraph.Layout.KamadaKawai(Edges, UseWeightsOtherwiseUnitWeights)

Excel=apaGraph.Layout.KamadaKawai(Edges, UseWeightsOtherwiseUnitWeights)

Result

Kamada-Kawai 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 ρ)

UseWeightsOtherwiseUnitWeights: TRUE to use the third column as edge distances (shortest-path costs), so that more similar nodes are placed closer together; FALSE to use unit distances

Remarks

The optimization stops early when the selected node can no longer move, since all further iterations would leave the layout unchanged.

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