0

Using JUNG FRLayout, all the nodes are pushed to the borders of the view, is there a way to avoid this? Attraction and Repulsion are both set to 0.75 and maxIter=100, although this behavior is observed for all values

Sample JUNG FRLayout

anarche
  • 536
  • 4
  • 19

1 Answers1

1

The variables that you have to play with are:

  1. node repulsion: the higher that is, the more the nodes will spread out
  2. edge attraction: the higher that is, the shorter the edges will be
  3. canvas (layout) size: the bigger the canvas, the less that the nodes will tend to bump up against the perimeter.

And of course you can also try out the other layout algorithms.

In your case I'd try cranking up the edge attraction and possibly also the layout size.

Joshua O'Madadhain
  • 2,704
  • 1
  • 14
  • 18