How can I plot curved lines in a graph plot?

The 'layered' layout of the plot function for a graph makes good looking plots (Figure A).
H = digraph(Adjacencymatrix);
h = plot(H,'Layout','layered','AssignLayers','alap','Sources',numel(Lind),'Sinks',leafind,'EdgeCData',1.1-H.Edges.Weight./7,'LineWidth',1,'NodeLabel',names(Lind));
However, I need to move some of the nodes in the graph plot around.
As soon as I change XData, YData of the plot, the edges of the graph plot become straight. (Figure B)
A)curved.jpgB)straight.jpg
plot() does not allow me to combine XData, YData with 'Layout'.
Exporting the figure to svg/pdf/eps does not preserve edge/node relationships, so I cannot easily move nodes in Inkscape either.
How can I get both
A) a graph plot with curved edges, and
B) determine / change some of the node positions
Thanks for helping

댓글 수: 1

Ben Ward
Ben Ward 2019년 4월 2일
Sorry I don't have the answer, as I am looking for the same thing myself. I thought I would give this a bump in case anyone else sees it.

댓글을 달려면 로그인하십시오.

답변 (1개)

Rostislav Teryaev
Rostislav Teryaev 2019년 4월 2일

0 개 추천

layout(h,'layered')
try using this after changing XData and YData

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품

릴리스

R2016b

질문:

2019년 2월 14일

답변:

2019년 4월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by