Are there any way on how to adjust the nodes in the graph?

 채택된 답변

Christine Tobler
Christine Tobler 2019년 1월 17일

4 개 추천

You can't directly drag the nodes of a GraphPlot object. Indirectly, you can modify the XData, YData and ZData properties of the object:
p = plot(graph('A', 'B'));
p.XData(1) = 3;
If you are up for a bit of configuration, here is a blog post which shows a way to allow the GraphPlot nodes to be dragged by mouse:

추가 답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 17일
편집: Walter Roberson 2019년 1월 17일

1 개 추천

No, the callbacks simply are not there inside GraphPlot objects. You would have to fake it with axes level callbacks modifying coordinates inside the object. This is not as straight forward as it might seem as it is a non-trivial object and delegates a bunch to a Java Beans object too.

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

제품

릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by