フィルターのクリア

Update graph (Graph Theory)?

5 ビュー (過去 30 日間)
Giuseppe Antonio
Giuseppe Antonio 2019 年 11 月 15 日
編集済み: Matt J 2019 年 11 月 15 日
Assuming I have a graph objects G = graph(s, t, weights) and I plotted it with plot(G, "XData", x, "YData", y); hold on;.
If during the program I (interactively) execute a callback function adding new nodes to G, I would like to update the plot.
I already know that I could just add the now and plot everything again, but is there a way to only plot the new nodes/edges?
Thanks in advance.

採用された回答

Matt J
Matt J 2019 年 11 月 15 日
編集済み: Matt J 2019 年 11 月 15 日
Perhaps like this,
hold on
H = subgraph(G,idx); %new part of graph
plot(H,'Layout','force','XData',___, 'YData',_____)
hold off

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraph and Network Algorithms についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by