layoutcoords
Syntax
Description
calculates the coordinates of the nodes of graph nodeCoords
= layoutcoords(G
)G
using an automatic
choice of layout method based on the structure of the graph.
[
also calculates the coordinates of the graph edges.nodeCoords
,edgeCoords
] = layoutcoords(G
)
[___] = layoutcoords(
specifies additional options using one or more name-value arguments. Which name-value
arguments are supported depends on the choice of layout method. For example,
G
,method
,Name=Value)layoutcoords(G,"force",Iterations=N)
specifies the number of iterations
to use in computing the force layout, and
layoutcoords(G,"layered",Sources=S)
uses a layered layout with source
nodes S
included in the first layer.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
References
[1] Fruchterman, T., and E. Reingold,. “Graph Drawing by Force-directed Placement.” Software — Practice & Experience. Vol. 21 (11), 1991, pp. 1129–1164.
[2] Gansner, E., E. Koutsofios, S. North, and K.-P Vo. “A Technique for Drawing Directed Graphs.” IEEE Transactions on Software Engineering. Vol.19, 1993, pp. 214–230.
[3] Barth, W., M. Juenger, and P. Mutzel. “Simple and Efficient Bilayer Cross Counting.” Journal of Graph Algorithms and Applications. Vol.8 (2), 2004, pp. 179–194.
[4] Brandes, U., and B. Koepf. “Fast and Simple Horizontal Coordinate Assignment.” LNCS. Vol. 2265, 2002, pp. 31–44.
[5] Y. Koren. “Drawing Graphs by Eigenvectors: Theory and Practice.” Computers and Mathematics with Applications. Vol. 49, 2005, pp. 1867–1888.
Version History
Introduced in R2024b