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)
B)
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 Comment
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/444929-how-can-i-plot-curved-lines-in-a-graph-plot#comment_688964
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/444929-how-can-i-plot-curved-lines-in-a-graph-plot#comment_688964
Sign in to comment.