Borrar filtros
Borrar filtros

Digraph node label threshold

4 visualizaciones (últimos 30 días)
ASC
ASC el 22 de Abr. de 2021
Respondida: Steven Lord el 22 de Abr. de 2021
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?

Respuesta aceptada

Steven Lord
Steven Lord el 22 de Abr. de 2021
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))

Más respuestas (0)

Categorías

Más información sobre Graph and Network Algorithms en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by