Digraph with a single constrained axis

I would like to visualize a 2-D graph where one dimension (x) is known. I would Matlab to optimize the other dimension automatically. Unfortunately, when specifying coordinates (xdata, ydata) both coordinates must be provided. Is there a work around where I could only specify xdata and the y-coordinate would be optimized algorithmically?

 採用された回答

Christine Tobler
Christine Tobler 2021 年 4 月 23 日

0 投票

All algorithms for graph visualization that I'm aware of will compute both x and y (and sometimes z) coordinates for the nodes. The best I can suggest is to just use random numbers for the other axis.

1 件のコメント

ASC
ASC 2021 年 4 月 23 日
Thanks for your input.

サインインしてコメントする。

その他の回答 (1 件)

Steven Lord
Steven Lord 2021 年 4 月 23 日

0 投票

Are you trying to create some sort of horizontal flowchart? If so them perhaps using the 'layered' layout with the 'Direction' option will help you.

1 件のコメント

ASC
ASC 2021 年 4 月 23 日
I am trying to do something like this. The layered options work (pretty) well but I would like something better. I want to constrain each data point on one dimension.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeGraph and Network Algorithms についてさらに検索

製品

リリース

R2019b

質問済み:

ASC
2021 年 4 月 23 日

コメント済み:

ASC
2021 年 4 月 23 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by