If the layout.fruchterman.reingold
algorithm still does not give what you want by tweaking the parameters, simply do the following. Every layout returns a set of coordinates, with the x- and y-coordinate in the first and second column respectively. You can apply any transformation you like here, and if you would just like to scale it, simply use
L = layout.fruchterman.reingold(G)*s; #Scaling factor s
More fancy transformations are of course also possible. Just for the record, you can also edit the layout manually with your mouse by using tkplot(G, layout=L)
. You can get the coordinates back via L = tkplot.getcoords(1)
.