Thanks a lot! I might also need some help with another question:
I have a graph A, then I want to add edges dynamically to the graph. Currently what I am doing is: use get.edgelist(A) to get the edgelist as a matrix, then change this matrix into a vector, then attach new edges to the end this vector, and finally use graph(edges, n) to construct the new graph. I want to add edges to the graph one by one. Each edge is added based on the structure of the graph in the previous step. What would be an efficient way of doing this? Thanks, Xuan Wang (PhD) Department of Statistics and Operations Research, University of North Carolina at Chapel Hill, Chapel Hill, NC, 27514 [email protected] http://xwang.web.unc.edu On Jan 3, 2014, at 1:00 AM, [email protected] wrote: >> >> In my mind, the ideal way of doing this is starting with the layout >> layout.fruchterman.reingold(A), then add a few edges and do a few more >> iterations on the layout to get the layout for graph B. Could anyone help me >> with this? > > layout.fruchtermain.reingold() has a parameter named ?start? where you can > pass a two-column matrix with the initial positions of the vertices. You may > also want to specify the ?niter? parameter for the second call in order to > run a few iterations only instead of 500 (the default). > > T. >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
