How to plot 4 nodes in a weighted digraph as a square?
古いコメントを表示
I am trying to control the layout of a digraph consisting of two pairs of nodes so the graph looks something like this:
node1_pair1 <-> node1_pair2
node2_pair1 <-> node2_pair2
I would like the two pairs to be arranged in a square, with either pair showing weighted connections to the other. When there are only "horizontal connections" (e.g. node1_pair1 -> node1_pair2), I am able to retain a square arrangement of nodes by using the layout function:
layout(p,'layered','direction','right');'
However, when I try to add a "diagonal" connection (e.g. node1_pair1 -> node2_pair2) or vertical connection, the nodes lose their square arrangemnt. How can I retain a square arrangement of nodes regardless of the connections I add?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Graph and Network Algorithms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!