#two random trees
tree1<-rtree(40) #random tree with 40 leaves
tree2<-rtree(20) #random tree with 20 leaves
#creation of the association matrix
association<-matrix(ncol=2, nrow=40)
association[,1]<-association[,2]<-tree2$tip.label
#plot
cophyloplot(tree1, tree2, assoc=association, length.line=4, space=28, gap=3)
#plot with rotations
cophyloplot(tree1, tree2, assoc=association, length.line=4, space=28, gap=3, rotate=TRUE)
Run the code above in your browser using DataLab