How to control the curvature of each edge when drawing graph object?

9 ビュー (過去 30 日間)
Youngjai
Youngjai 2024 年 1 月 10 日
回答済み: Christine Tobler 2024 年 1 月 10 日
I draw a graph following the link ( https://www.mathworks.com/help/matlab/ref/graph.plot.html )
However, I want to edit the curvature of each edge as different values.
How can I assign the degree of curvature in each edge?
Thank you!

回答 (2 件)

Matt J
Matt J 2024 年 1 月 10 日
You do not have any direct control over how the edges are drawn. You do have control over the X,Y postiions of nodes, however, so conceivably, you could insert a lot of subnodes along the edges at desired X,Y locations so as to trace out a particular curve.

Christine Tobler
Christine Tobler 2024 年 1 月 10 日
The curvature of the edges in this plot aren't controllable. You could turn off the edges from the graph plot, and use the plot command to instead draw your own edges. The coordinates of each node are available through the XData, YData properties.

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by