Dear All,
exploring the layout_kamada_kawai method of the igraph.Graph class in
Python, I can't seem to find a way to reproduce a layout. The graph is
always the same (to the extent I can visually tell), but the placement
of vertices is different each time.
I tried specifying the seed parameter as follows:
s = []
s.append(range(len(g.vs)))
s.append(range(len(g.vs)))
l = g.layout_kamada_kawai(seed = s)
but the layout is still different each time.
The best educated guess I have at this point is that the iterative
vertex placement by simulated annealing involves stochastic elements
in addition to the initial placement, but I can't seem to find any
way to locate the pseudorandom number generator used for such purposes,
so I could take control of it / its seed.
As the documentation on the seed parameter "If a matrix (list of lists),
uses the given matrix as the starting position" is not entirely unambiguous
to me, I also tried the transposed version of that generated above:
s = []
for i in xrange(len(g.vs)) :
s.append([i, i])
but the layouts still differ each time.
Any suggestions / RTFMs welcome.
Best regards & thanks in advance, Jan
--
+- Jan T. Kim -------------------------------------------------------+
| email: [email protected] |
| WWW: http://www.jtkim.dreamhosters.com/ |
*-----=< hierarchical systems are for files, not for humans >=-----*
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help