Is it possible to remove labels added with labelnode?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giuseppe Antonio
am 26 Nov. 2019
Bearbeitet: Adam Danz
am 26 Nov. 2019
I used this function to add some specific node labels
labelnode(G,selectedPoints, labels);
Now I want to remove (ALL) labels. How to do it?
0 Kommentare
Akzeptierte Antwort
Adam Danz
am 26 Nov. 2019
Bearbeitet: Adam Danz
am 26 Nov. 2019
Here's how to remove all labels and how to restore default labels
% Create demo GraphPlot
s = [1 1 2 2 3 4 5 5];
t = [2 3 3 4 4 5 1 2];
G = digraph(s,t);
h = plot(G); % Store handle!
labelnode(h,[1 2],{'source' 'target'})
% To reset labels
h.NodeLabelMode = 'auto';
% To remove all labels
h.NodeLabel = {};
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!