Connect nodes and edges with different layout
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I create a adjacency matrix, in the form: http://yed.yworks.com/wp-content/uploads/2011/08/format_adjacencymatrix1.png
so there are 5 nodes (names) and 8 edges (number of 1). the table is read as, for example, Anna and Chris is connected (put 1 there).
I want to use a kind of graphic theory to draw their relationships, so what kind of code I can use? I hope the such network figure is as beautiful as possible, and the size of nodes is a linear relationship with the number of connections, i.e. the more connections to that people, the node of that people is bigger. and also put the name of that people in the node.
Please give me some clues or hints, many thanks
Kyle
0 commentaires
Réponses (1)
Walter Roberson
le 29 Sep 2012
You can use rectangle() [yes, seriously] to draw the circles. You can adjust the size of the circle in the command to draw it. You can text() the name into place in the circle.
Those things are simple, more "housekeeping" than anything else.
The difficult part of your task is that "as beautiful as possible" is going to be very very difficult to achieve. You are going to have to start by inventing ways to measure peoples' "sense of beauty", and then do many many tests to find the most beautiful arrangement possible for humans. And then you are going to have to figure out how to draw that. Mathworks does not offer any toolboxes that allow "beauty" to be measured.
0 commentaires
Voir également
Catégories
En savoir plus sur Construction dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!