I have created a network based on interactions. Some vertices have more interaction and some has less interaction. I have to display the vertex with more interaction at the center of the network and other vertices should lie around the central vertex. How can i proceed with this? Please help me with this
Asked
Active
Viewed 60 times
1 Answers
0
If none of the existing layout algorithms do what you want, then you will need to provide your own Layout
class.
An intermediate option that you might try would be to identify the vertices that have the highest degree, fix[1] their positions in places at the middle of the viewing area that look good to you, and then let the layout algorithm select the positions for the rest of the vertices.
[1] use setLocation() and lock() before you start the layout algorithm: http://jung.sourceforge.net/doc/api/edu/uci/ics/jung/algorithms/layout/AbstractLayout.html#setLocation(V, double, double)

Joshua O'Madadhain
- 2,704
- 1
- 14
- 18
-
Thank you sir. I'll try with the above. – Steffi Ma Aug 29 '15 at 12:20
-
Sir i have tried with static Layout. But vertices and edges are Strings. SO how can i set location for my vertices. **Transformer
locationTransformer = new Transformer – Steffi Ma Sep 09 '15 at 11:38() { @Override public Point2D transform(String i) { int value = (i * 80) + 20; return new Point2D.Double((double) value, (double) value); } };** -
Thank you sir. I'll try. – Steffi Ma Sep 14 '15 at 07:08