dolayout(bg, 'Pathsonly', true) produces overlapping edges
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Dear Community,
I tried to produce the same layout for the same graph. Which means I have different edge weights but the graph is the same. So I set the node position for the layout as in the example dolayout. That means:
bg = biograph(newGraph)
defaultBg = biograph(defaultGraph);
dolayout(defaultBg); dolayout(bg);
n_v = size(bg.getmatrix,1);
n_e = size(find(bg.getmatrix),1);
if exist('graphLayout.mat', 'file')
load('graphLayout');
end
for counter = 1:n_v
bg.nodes(counter).Position = graphLayout.nodes(counter,2:3);
end
set(bg, 'EdgeType', 'curved');
dolayout(bg, 'Pathsonly', true);
The problem is if I just say dolayout(bg) the nodes are reset to a new position, but the edges are fine. If I only recalculate the paths with dolayout(bg, 'Pathsonly', true) then reciprocal edges are overlapping. Does anyone have an idea to avoid this problem?
Thank you and best regards.
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Graph and Network Algorithms in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!