Bruno,
if you have to do this only once, then you can plot the graph
interactively, adjust the positions and use the new coordinates. E.g.:
g <- ba.game(100,1)
id <- tkplot(g, layout=layout.kamada.kawai)
## Adjust the positions here
coords <- tkplot.getcoords(id)
If you need to do this over and over again, then here is the excerpt
of some emails in the subject:
-----------
[...]
I don't know any direct way to do this, unfortunately. You
can try to run a couple of steps with a force-based layout algorithm
(a different one, if your original layout was generated such a way).
E.g.
library(igraph)
set.seed(1123)
g <- graph.tree(40)
V(g)$size <- 10
lay <- layout.norm(layout.random(g), -1,1,-1,1)
plot(g, layout=lay)
lay2 <- layout.graphopt(g, niter=10, start=lay, max.sa.movement=1/200)
lay2 <- layout.norm(lay2, -1,1, -1,1)
plot(g, layout=lay)
plot(g, layout=lay2)
[...]
-----------
Thanks for the great advice. I did a bit of experimenting to find the
best layout for me. I used a similar approach to the one you proposed: I
created an initial reingold.tilford layout, normalised it, applied a
force-based algorithm (fruchterman.reingold.grid), and normalised it
again. Layouting a graph seems quite involved, but I'm certainly happy
with the result.
------------
Best,
Gabor
On Tue, Mar 3, 2009 at 11:45 AM, Bruno Contreras Moreira
<address@hidden> wrote:
Dear all,
I have searched the archive of the list and have not been able to find an
answer to this question:
is it possible to tell plot.igraph to use a layout.circle but avoiding
vertex overlap?
The point is that I am rendering a graph with ~100 nodes and the nodes
overlap so much that it is impossible to read the labels.
Can anybody help with this, please?
cheers,
Bruno
--
Bruno Contreras Moreira
Estación Experimental de Aula Dei /CSIC
Av.Montañana 1.005, 50059 Zaragoza (España).
Tel:(+34) 976716089 Fax:(+34) 976716145
address@hidden http://www.eead.csic.es/compbio
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help