You can manually relabel the edges using unique
, so that there are no holes in the list of node numbers. To maintain the original node names, pass them as fourth input to digraph
in the form of a cell array of strings:
S = [1 2 3 10];
T = [2 3 1 1];
[u, ~, w] = unique([S T]);
plot(digraph(w(1:end/2), w(end/2+1:end), [], cellstr(num2str(u.'))))
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments