graphs: always another layout with program=spring_embedding



On Sat, May 8, 2010 at 10:36 PM, Rolf Fankhauser
<rolf.fankhauser at gepdata.ch> wrote:
> If I call draw_graph(g,show_id = true, redraw=true) several times, I get
> always a different layout. Why? Is there a random element in the spring
> layout?

Spring embedding algorithm starts with random positions of vertices
and then refines the embedding according to a physical model. You get
different layouts because of initial random positions.

If you wish to preserve vertex positions remove redraw=true option
from draw_graph.

Andrej