Re: [R] layout of igraph

2009-02-26 Thread Gábor Csárdi
Shukai, layout.drl supports edge weights, so you could try that. An alternative is doing MDS, see ?cmdscale and maybe help.search("MDS"). But both these methods are approximate, obviously, most often you cannot embed an n-dimensional (n>>2) graph into the 2-dimensional plane and keep all the "dis

Re: [R] layout of igraph

2009-02-26 Thread kevinchang
Thanks Gabor's fast reply. In my research, every node has it's own vector of scores. So I can compute correlation between every pair of nodes. I used the width and color of the edge for this purpose. But visualizing the correlations by distance may be clearer. Best, Shukai Gábor Csárdi-2 wro

Re: [R] layout of igraph

2009-02-26 Thread Gábor Csárdi
Shukai, the force based layout algorithms (layout.drl, layout.fruchterman.reingold, layout.graphopt, layout.kamada.kawai) are likely to do this; although they are not explicitly required to place hubs in the center, usually they do. I am not sure what is the "correlation between two nodes". You m

[R] layout of igraph

2009-02-26 Thread kevinchang
Dear R users, I am trying to draw a network using igraph package. I intend to place the hub nodes (the ones with the relatively more connection with other nodes) in the center of the graph. Also, the graph need to be in the fashion that the higher the correlation between two nodes is , the clos