Clear Filters
Clear Filters

Connect nodes and edges with different layout

1 view (last 30 days)
Kyle
Kyle on 29 Sep 2012
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

Answers (1)

Walter Roberson
Walter Roberson on 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.

Categories

Find more on Just for fun in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!