필터 지우기
필터 지우기

Digraph node label threshold

조회 수: 4 (최근 30일)
ASC
ASC 2021년 4월 22일
답변: Steven Lord 2021년 4월 22일
For (di)graphs with greater than 100 nodes the nodes are no longer labeled when plotted. Is there a way to change this threshold? Force labeling?

채택된 답변

Steven Lord
Steven Lord 2021년 4월 22일
Is there a way to change this threshold?
No.
Force labeling?
Yes.
D = digraph(sprand(150, 150, 0.1));
h = plot(D); % No labels
figure
h = plot(D);
h.NodeLabelMode = 'auto';
Or if you want to label only a few nodes see the labelnode function.
figure
h = plot(D);
nodesToLabel = 1:30:numnodes(D);
labelnode(h, nodesToLabel, string(nodesToLabel))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by