When plot graph vertex labels cut the edges, how to avoid it?

1 Ansicht (letzte 30 Tage)

Akzeptierte Antwort

Sugandhi
Sugandhi am 20 Mär. 2023
Hi Chathuranga kumara,
I understand that labels of nodes in the graph are overlapping with edges.
One possible workaround could be manipulating graph plot properties by providing custom node coordinates for the graph nodes, which can be done by setting XData or YData properties of graph plot object. Another way could be by using layout method of graph plot object.
>>layout(H)
Above command changes the layout of graph plot H by using an automatic choice of layout method based on the structure of the graph. The layout function modifies the XData and YData properties of H.
For more understanding kindly go through the following links –

Weitere Antworten (1)

Matt J
Matt J am 20 Mär. 2023
You can remove the node labels as follows:
h=plot(graph(bucky));
h.NodeLabel={};

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by