[igraph] combine 2 plots - one network and one phylogenetic tree with R
From:
Augusto Ribas
Subject:
[igraph] combine 2 plots - one network and one phylogenetic tree with R
Date:
Wed, 20 Jun 2012 08:21:34 -0700 (PDT)
Hello. I was using the package ipgraph to plot networks of parasites
and hosts in R. Then i though about plug a phylogeny tree on the plot. But
I'm having some difficulties to do so.
#I have data that look like this, 6 parasites ("P") and six host species ("P") dados<-matrix(c(1,1,1,1,0,0, 0,1,1,1,0,0, 0,0,1,1,0,0, 0,0,0,0,1,0,
0,0,0,0,0,1, 0,0,0,0,0,1),byrow=T,ncol=6,
nrow=6, dimnames=list(paste("P",1:6,sep=""),paste("H",1:6,sep=""))) dados
#Then i convert the data a way i can use with igraph packages
#Is there a more elegant way to change data like this anyway?
so instead the plotweb for the network plot, i would like to use plot.igraph() But is there some simple way, like a layout that would make it? Hope i'm not confuseing everything.