> Thank you. How can I then persuade igraph to plot the graph on a 2d
> grid maintaining the original position of the nodes?
>  
>  

>>> layout = [index_to_grid_coords(i) for i in xrange(g.vcount())]
>>> plot(g, layout=layout)

Explanation: the layout=… keyword argument of plot() simply expects a Layout 
object or a list of (x, y) coordinates, one for each vertex in the graph. I 
simply construct such a list using the index_to_grid_coords() function and then 
pass that to plot() as the layout keyword.

—  
T.
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to