Change layout of graph plot
layout(
changes the layout of graph plotH
)H
by using an automatic choice of layout method based on the structure of the graph. Thelayout
function modifies theXData
和YDATA
properties ofH
。
Use theLayout
name-value pair to change the layout of a graph when you plot it. For example,plot(G,'Layout','circle')
plots the graphG
带有圆形布局。
When using the'force'
或者'force3'
layout methods, a best practice is to use more iterations with the algorithm instead of usingXStart
,YStart
, 和ZSTART
to restart the algorithm using previous outputs. The result of executing the algorithm with 100 iterations is different in comparison to executing 50 iterations, and then restarting the algorithm from the ending positions to execute 50 more iterations.
[1] Fruchterman, T., and E. Reingold,. “Graph Drawing by Force-directed Placement.”Software — Practice & Experience。卷。21(11),1991年,第1129–1164页。
[2]Gansner, E., E. Koutsofios, S. North, and K.-P Vo. “A Technique for Drawing Directed Graphs.”IEEE软件工程交易。卷。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。第8卷(2),2004年,第179-194页。
[4] Brandes, U., and B. Koepf. “Fast and Simple Horizontal Coordinate Assignment.”LNCS。卷。2265, 2002, pp. 31–44.
[5] Y. Koren. “Drawing Graphs by Eigenvectors: Theory and Practice.”Computers and Mathematics with Applications。卷。49, 2005, pp. 1867–1888.