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

조회 수: 2 (최근 30일)
CHATHURANGA KUMARA
CHATHURANGA KUMARA 2023년 3월 20일
답변: Matt J 2023년 3월 20일

채택된 답변

Sugandhi
Sugandhi 2023년 3월 20일
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 –

추가 답변 (1개)

Matt J
Matt J 2023년 3월 20일
You can remove the node labels as follows:
h=plot(graph(bucky));
h.NodeLabel={};

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by