Skip to content
Prev 3123 / 7420 Next

combine 2 plots - one network and one phylogenetic tree

Hi Augusto,

Which layout do you want to reproduce? The layout of the first network
you plot?

Do you know the "tkplot" function of igraph? You can plot the network
using tkplot and then you can read the coordinates of the nodes into a
variable. Like this:

tkplot(dados.igraph,layout=layout.fruchterman.reingold,vertex.color=c(rep("red",6),rep("green",6)),edge.arrow.size=0.2,vertex.size=20,vertex.label=c(paste("P",1:6,sep=""),paste("H",1:6,sep="")));
my_layout<-tkplot.getcoords(1);

So you can use the variable my_layout (a matrix of coordinates) in
other plots of network you want to:

plot(dados.igraph, layout=my_layout)

Sorry if it is not what you are looking for. Maybe if you write
directly to the igraph-help mailing list you can have more luck. They
use to answer the questions quickly:

https://groups.google.com/forum/?fromgroups#!forum/network-analysis-with-igraph

All the best,

Charles
On Wed, Jun 20, 2012 at 4:04 PM, Augusto Ribas <ribas.aca at gmail.com> wrote: