layout
グラフ プロットのレイアウトを変更
説明
layout(
は、グラフの構造に基づくレイアウト メソッドを自動選択することにより、グラフ プロット H
)H
のレイアウトを変更します。関数 layout
は、H
の XData
と YData
のプロパティを変更します。
layout(
は、1 つ以上の名前と値のペアの引数で指定された追加のオプションを使用します。たとえば、H
,method
,Name,Value
)layout(H,'force','Iterations',N)
はフォース レイアウトの計算に使用する反復回数を指定し、layout(H,'layered','Sources',S)
は階層型レイアウトを使用してソース ノード S
を最初の層に入れます。
例
入力引数
名前と値の引数
ヒント
グラフをプロットするときにレイアウトを変更するには、
Layout
の名前と値のペアを使用します。たとえば、plot(G,'Layout','circle')
はグラフG
を円形レイアウトでプロットします。'force'
または'force3'
レイアウト メソッドを使用するときの最良の方法は、XStart
、YStart
およびZStart
を使用して以前の出力からアルゴリズムを再開するのではなく、アルゴリズムでより多くの反復回数を使用することです。反復回数が 100 回のアルゴリズムの実行結果は、50 回の反復後、その終了位置からアルゴリズムを再開してさらに 50 回反復実行した結果とは異なります。
参照
[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.
バージョン履歴
R2015b で導入