Can i adjust nodes in digraph?

2 vues (au cours des 30 derniers jours)
John Federick Ferre
John Federick Ferre le 16 Jan 2019
Commenté : Walter Roberson le 17 Jan 2019
Are there any way on how to adjust the nodes in the graph?
  1 commentaire
Guillaume
Guillaume le 16 Jan 2019
What does adjust actually mean?

Connectez-vous pour commenter.

Réponse acceptée

Christine Tobler
Christine Tobler le 17 Jan 2019
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 commentaire
Walter Roberson
Walter Roberson le 17 Jan 2019
Thanks, Christine.

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 17 Jan 2019
Modifié(e) : Walter Roberson le 17 Jan 2019
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.

Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by