필터 지우기
필터 지우기

Is it possible to remove labels added with labelnode?

조회 수: 7 (최근 30일)
Giuseppe Antonio
Giuseppe Antonio 2019년 11월 26일
편집: Adam Danz 2019년 11월 26일
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?

채택된 답변

Adam Danz
Adam Danz 2019년 11월 26일
편집: Adam Danz 2019년 11월 26일
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개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by