I am attempting to represent a network using a circle of nodes, with connetions going to/from different nodes in a directed manner. I have been using the digraph object with some success, but have discovered that the lines drawn to/from different nodes using that object are always perfectly straight unless there happens to be a reciprocally connected pair of nodes (in which case some arc is added to the connections). Is there anyway to make a directed graph that has curved connections--bent at different angles depending on distance between nodes.
Essentially, I want to recreate the result from Kassebaum's circularGraph (https://www.mathworks.com/matlabcentral/fileexchange/48576-circulargraph), but with directed connections.
On a related note, I am thinking that I could use half-arrows whenever there is a reciprocal connection (so that there's room for both to/from connections to be displayed). Is this at all possible?

 採用された回答

darova
darova 2019 年 9 月 18 日

1 投票

Here is a simple method how to draw arcs
img1.png img2.png
img3.png img5.png
see attached script

4 件のコメント

Chris Endemann
Chris Endemann 2019 年 9 月 24 日
Thanks. This is closer to what I want. I still need to figure out how to add directionality to each line via incorporating an arrow of some sort. This is really easy to do using the digraph function, but I'm guessing I'll have to hack out a solution if I want the arc behavior. If you have any tips on how to add arrows to this, please let me know. Here's to hoping Matlab adds some additional functionality to their digraph object.
darova
darova 2019 年 9 月 24 日
編集済み: darova 2019 年 9 月 24 日
How arrows should look like? Can you draw an example?
Chris Endemann
Chris Endemann 2019 年 9 月 24 日
I would like arrows to show the directionality of each connection in the graph, with each arrow placed at the center of each line/arc.
darova
darova 2019 年 9 月 24 日
See attached script
Look also HERE

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

その他の回答 (0 件)

カテゴリ

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

質問済み:

2019 年 9 月 17 日

コメント済み:

2019 年 9 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by