save the layout using igraph
Shukai, the layout functions return a matrix that you can supply as the 'layout' argument of the plotting functions, e.g. g1 <- erdos.renyi.game(50,2/50) lay <- layout.fruchterman.reingold(g1) g2 <- delete.edges(g1, sample(ecount(g1), 30)-1) plot(g1, layout=lay, vertex.size=10) plot(g2, layout=lay, vertex.size=10) Best, Gabor
On Tue, Mar 3, 2009 at 8:37 PM, kevinchang <shukai at seas.upenn.edu> wrote:
Hi R users, I am using built-in functions in ?igraph package to draw networks . I need to compare several network with exactly the same structure but with edge hightlighted differently. ?I am wondering if there is a way to save the layout so that every graph will look the same as each other except for the colors of edges. Or is there any parameter I can set for this purpose?? Thanks in advance, Shukai -- View this message in context: http://www.nabble.com/save-the-layout-using-igraph-tp22316155p22316155.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Gabor Csardi <Gabor.Csardi at unil.ch> UNIL DGM