Delete Highlighted Node in a Graph?

7 ビュー (過去 30 日間)
Sanjeev K
Sanjeev K 2019 年 4 月 22 日
コメント済み: Sanjeev K 2019 年 4 月 23 日
B = [0 1 1 1;...] % define adjacency matric of the graph
G = graph(B); plot h = G; highlight(h, 1, 'marker', 'v');
How do I delete the node highlighted so? I've tried things like "delete(findobj('marker','v')); ", but I am unable to achieve this. ( I want to delete just the the marker placed on the node, not the node itself)

採用された回答

Christine Tobler
Christine Tobler 2019 年 4 月 22 日
You can use highlight to set that marker to 'none'. The GraphPlot object h contains all the graphical properties of the plotted graph, so it's not possible to find a specific marker as a seperate object - all changes have to be made by changing the properties of the GraphPlot object h.
  1 件のコメント
Sanjeev K
Sanjeev K 2019 年 4 月 23 日
That works! Thanks a lot Christine!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by