How to get the right edge order in a Digraph plot?
Show older comments
If I have the following code, I expect to have the rows aligned in the digraph (plot). However this example gives me a plot with some swapments. Labels and weights seems to align though. Does someone knows how to solve this?
f.e. expected: edge 17 from node 4 to node 6 with weigth 7.
plotted: edge 17 from node 6 to node 5?
N1=[3;2;4;5;6;6;4];
N2=[1;3;3;4;5;4;6];
weights=[1;2;3;4;5;6;7];
labels=[11;12;13;14;15;16;17];
N=digraph(N1,N2,weights);
figure(1)
plot(N,'linewidth',weights,'edgelabel',labels)
Accepted Answer
More Answers (0)
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!