o collapsed.singles() did not propagate the 'Nnode' and
'node.labels' elements (thanks to Elizabeth Purdom for the fix).
- o read.nexus failed to remove correctly the comments within trees.
+ o read.nexus() failed to remove correctly the comments within
+ trees.
+
+ o read.nexus() failed to read a file with a single tree and no
+ translation of tip labels.
OTHER CHANGES
--- /dev/null
+## cophyloplot.R (2008-07-08)
+
+## Plots two phylogenetic trees face to
+## face with the links between the tips
+
+## Copyright 2008 Damien de Vienne
+
+## This file is part of the R-package `ape'.
+## See the file ../COPYING for licensing issues.
+
+cophyloplot <-
+ function (x, y, assoc = NULL, use.edge.length = FALSE, space = 0,
+ length.line = 1, gap = 2, type = "phylogram",
+ rotate = FALSE, col = "red", show.tip.label = TRUE,
+ font = 3, ...)
+{
+ if (is.null(assoc)) {
+ assoc <- matrix(ncol = 2)
+ print("No association matrix specified. Links will be omitted.")
+ }
+ if (rotate == TRUE) {
+ cat("\n Click on a node to rotate (right click to exit)\n\n")
+ repeat {
+ res <- plotCophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
+ space = space, length.line = length.line, gap = gap,
+ type = type, return = TRUE, col = col, show.tip.label = show.tip.label,
+ font = font)
+ click <- identify(res$c[, 1], res$c[, 2], n = 1)
+ if (click < length(res$a[, 1]) + 1) {
+ if (click > res$N.tip.x)
+ x <- rotate(x, click)
+ }
+ else if (click < length(res$c[, 1]) + 1) {
+ if (click > length(res$a[, 1]) + res$N.tip.y)
+ y <- rotate(y, click - length(res$a[, 1]))
+ }
+ plotCophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
+ space = space, length.line = length.line, gap = gap,
+ type = type, return = TRUE, col = col, show.tip.label = show.tip.label,
+ font = font)
+ }
+ on.exit(print("done"))
+ }
+ else plotCophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
+ space = space, length.line = length.line, gap = gap,
+ type = type, return = FALSE, col = col, show.tip.label = show.tip.label,
+ font = font)
+}
+
+plotCophylo2 <-
+ function (x, y, assoc = assoc, use.edge.length = use.edge.length,
+ space = space, length.line = length.line, gap = gap,
+ type = type, return = return, col = col,
+ show.tip.label = show.tip.label, font = font, ...)
+{
+ res <- list()
+
+###choice of the minimum space between the trees###
+ left <- max(nchar(x$tip.label, type = "width")) + length.line
+ right <- max(nchar(y$tip.label, type = "width")) + length.line
+ space.min <- left + right + gap * 2
+ if ((space <= 0) || (space < space.min))
+ space <- space.min
+
+ N.tip.x <- Ntip(x)
+ N.tip.y <- Ntip(y)
+ res$N.tip.x <- N.tip.x
+ res$N.tip.y <- N.tip.y
+ a <- plotPhyloCoor(x, use.edge.length = use.edge.length,
+ type = type)
+ res$a <- a
+ b <- plotPhyloCoor(y, use.edge.length = use.edge.length,
+ direction = "leftwards", type = type)
+
+###for the two trees to have the extreme leaves at the same ordinate.
+ a[, 2] <- a[, 2] - min(a[, 2])
+ b[, 2] <- b[, 2] - min(b[, 2])
+
+ res$b <- b
+
+ b2 <- b
+ b2[, 1] <- b[1:nrow(b), 1] * (max(a[, 1])/max(b[, 1])) +
+ space + max(a[, 1])
+ b2[, 2] <- b[1:nrow(b), 2] * (max(a[, 2])/max(b[, 2]))
+
+ res$b2 <- b2
+
+ c <- matrix(ncol = 2, nrow = nrow(a) + nrow(b))
+ c[1:nrow(a), ] <- a[1:nrow(a), ]
+ c[nrow(a) + 1:nrow(b), 1] <- b2[, 1]
+ c[nrow(a) + 1:nrow(b), 2] <- b2[, 2]
+ res$c <- c
+
+ plot(c, type = "n", xlim = NULL, ylim = NULL, log = "", main = NULL,
+ sub = NULL, xlab = NULL, ylab = NULL, ann = FALSE, axes = FALSE,
+ frame.plot = FALSE)
+
+###segments for cladograms
+ if (type == "cladogram") {
+ for (i in 1:(nrow(a) - 1))
+ segments(a[x$edge[i, 1], 1], a[x$edge[i, 1], 2],
+ a[x$edge[i, 2], 1], a[x$edge[i, 2], 2])
+ for (i in 1:(nrow(b) - 1))
+ segments(b2[y$edge[i, 1], 1], b2[y$edge[i, 1], 2],
+ b2[y$edge[i, 2], 1], b2[y$edge[i, 2], 2])
+ }
+
+###segments for phylograms
+ if (type == "phylogram") {
+ for (i in (N.tip.x + 1):nrow(a)) {
+ l <- length(x$edge[x$edge[, 1] == i, ][, 1])
+ for (j in 1:l) {
+ segments(a[x$edge[x$edge[, 1] == i, ][1, 1],
+ 1], a[x$edge[x$edge[, 1] == i, 2], 2][1], a[x$edge[x$edge[,
+ 1] == i, ][1, 1], 1], a[x$edge[x$edge[, 1] ==
+ i, 2], 2][j])
+ segments(a[x$edge[x$edge[, 1] == i, ][1, 1],
+ 1], a[x$edge[x$edge[, 1] == i, 2], 2][j], a[x$edge[x$edge[,
+ 1] == i, 2], 1][j], a[x$edge[x$edge[, 1] ==
+ i, 2], 2][j])
+ }
+ }
+ for (i in (N.tip.y + 1):nrow(b)) {
+ l <- length(y$edge[y$edge[, 1] == i, ][, 1])
+ for (j in 1:l) {
+ segments(b2[y$edge[y$edge[, 1] == i, ][1, 1],
+ 1], b2[y$edge[y$edge[, 1] == i, 2], 2][1],
+ b2[y$edge[y$edge[, 1] == i, ][1, 1], 1], b2[y$edge[y$edge[,
+ 1] == i, 2], 2][j])
+ segments(b2[y$edge[y$edge[, 1] == i, ][1, 1],
+ 1], b2[y$edge[y$edge[, 1] == i, 2], 2][j],
+ b2[y$edge[y$edge[, 1] == i, 2], 1][j], b2[y$edge[y$edge[,
+ 1] == i, 2], 2][j])
+ }
+ }
+ }
+ if (show.tip.label) {
+ text(a[1:N.tip.x, ], cex = 0, font = font, pos = 4,
+ labels = x$tip.label)
+ text(b2[1:N.tip.y, ], cex = 1, font = font, pos = 2,
+ labels = y$tip.label)
+ }
+
+###links between associated taxa. Takes into account the size of the character strings of the taxa names.
+ lsa <- 1:N.tip.x
+ lsb <- 1:N.tip.y
+ decx <- array(nrow(assoc))
+ decy <- array(nrow(assoc))
+ for (i in 1:nrow(assoc)) {
+ if (show.tip.label) {
+ decx[i] <- strwidth(x$tip.label[lsa[x$tip.label ==
+ assoc[i, 1]]])
+ decy[i] <- strwidth(y$tip.label[lsb[y$tip.label ==
+ assoc[i, 2]]])
+ } else {
+ decx[i] <- decy[i] <- 0
+ }
+ segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + decx[i] +
+ gap, a[lsa[x$tip.label == assoc[i, 1]], 2], a[lsa[x$tip.label ==
+ assoc[i, 1]], 1] + gap + left, a[lsa[x$tip.label ==
+ assoc[i, 1]], 2], col = col)
+ segments(b2[lsb[y$tip.label == assoc[i, 2]], 1] - (decy[i] +
+ gap), b2[lsb[y$tip.label == assoc[i, 2]], 2], b2[lsb[y$tip.label ==
+ assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label ==
+ assoc[i, 2]], 2], col = col)
+ segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + gap +
+ left, a[lsa[x$tip.label == assoc[i, 1]], 2], b2[lsb[y$tip.label ==
+ assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label ==
+ assoc[i, 2]], 2], col = col)
+ }
+ if (return == TRUE)
+ return(res)
+}
makeLabel.multiPhylo <- function(x, tips = TRUE, nodes = TRUE, ...)
{
- y <- attr("TipLabel", x)
+ y <- attr(x, "TipLabel")
if (is.null(y)) {
for (i in 1:length(x))
x[[i]] <- makeLabel.phylo(x[[i]], tips = tips, nodes = nodes, ...)
} else {
- attr("TipLabel", x) <- makeLabel.character(y, ...)
+ attr(x, "TipLabel") <- makeLabel.character(y, ...)
}
x
}
+++ /dev/null
-## plot.cophylo.R (2008-04-14)
-
-## Plots two phylogenetic trees face to
-## face with the links between the tips
-
-## Copyright 2008 Damien de Vienne
-
-## This file is part of the R-package `ape'.
-## See the file ../COPYING for licensing issues.
-
-plot.cophylo <-
- function (x, y, assoc = NULL, use.edge.length = FALSE, space = 0,
- length.line = 1, gap = 2, type = "phylogram",
- rotate = FALSE, col = "red", show.tip.label = TRUE,
- font = 3, ...)
-{
- if (is.null(assoc)) {
- assoc <- matrix(ncol = 2)
- print("No association matrix specified. Links will be omitted.")
- }
- if (rotate == TRUE) {
- cat("\n Click on a node to rotate (right click to exit)\n\n")
- repeat {
- res <- plot.cophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
- space = space, length.line = length.line, gap = gap,
- type = type, return = TRUE, col = col, show.tip.label = show.tip.label,
- font = font)
- click <- identify(res$c[, 1], res$c[, 2], n = 1)
- if (click < length(res$a[, 1]) + 1) {
- if (click > res$N.tip.x)
- x <- rotate(x, click)
- }
- else if (click < length(res$c[, 1]) + 1) {
- if (click > length(res$a[, 1]) + res$N.tip.y)
- y <- rotate(y, click - length(res$a[, 1]))
- }
- plot.cophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
- space = space, length.line = length.line, gap = gap,
- type = type, return = TRUE, col = col, show.tip.label = show.tip.label,
- font = font)
- }
- on.exit(print("done"))
- }
- else plot.cophylo2(x, y, assoc = assoc, use.edge.length = use.edge.length,
- space = space, length.line = length.line, gap = gap,
- type = type, return = FALSE, col = col, show.tip.label = show.tip.label,
- font = font)
-}
-
-plot.cophylo2 <-
- function (x, y, assoc = assoc, use.edge.length = use.edge.length,
- space = space, length.line = length.line, gap = gap,
- type = type, return = return, col = col,
- show.tip.label = show.tip.label, font = font, ...)
-{
- res <- list()
-
-###choice of the minimum space between the trees###
- left <- max(nchar(x$tip.label, type = "width")) + length.line
- right <- max(nchar(y$tip.label, type = "width")) + length.line
- space.min <- left + right + gap * 2
- if ((space <= 0) || (space < space.min))
- space <- space.min
-
- N.tip.x <- Ntip(x)
- N.tip.y <- Ntip(y)
- res$N.tip.x <- N.tip.x
- res$N.tip.y <- N.tip.y
- a <- plot.phylo.coor(x, use.edge.length = use.edge.length,
- type = type)
- res$a <- a
- b <- plot.phylo.coor(y, use.edge.length = use.edge.length,
- direction = "leftwards", type = type)
-
-###for the two trees to have the extreme leaves at the same ordinate.
- a[, 2] <- a[, 2] - min(a[, 2])
- b[, 2] <- b[, 2] - min(b[, 2])
-
- res$b <- b
-
- b2 <- b
- b2[, 1] <- b[1:nrow(b), 1] * (max(a[, 1])/max(b[, 1])) +
- space + max(a[, 1])
- b2[, 2] <- b[1:nrow(b), 2] * (max(a[, 2])/max(b[, 2]))
-
- res$b2 <- b2
-
- c <- matrix(ncol = 2, nrow = nrow(a) + nrow(b))
- c[1:nrow(a), ] <- a[1:nrow(a), ]
- c[nrow(a) + 1:nrow(b), 1] <- b2[, 1]
- c[nrow(a) + 1:nrow(b), 2] <- b2[, 2]
- res$c <- c
-
- plot(c, type = "n", xlim = NULL, ylim = NULL, log = "", main = NULL,
- sub = NULL, xlab = NULL, ylab = NULL, ann = FALSE, axes = FALSE,
- frame.plot = FALSE)
-
-###segments for cladograms
- if (type == "cladogram") {
- for (i in 1:(nrow(a) - 1))
- segments(a[x$edge[i, 1], 1], a[x$edge[i, 1], 2],
- a[x$edge[i, 2], 1], a[x$edge[i, 2], 2])
- for (i in 1:(nrow(b) - 1))
- segments(b2[y$edge[i, 1], 1], b2[y$edge[i, 1], 2],
- b2[y$edge[i, 2], 1], b2[y$edge[i, 2], 2])
- }
-
-###segments for phylograms
- if (type == "phylogram") {
- for (i in (N.tip.x + 1):nrow(a)) {
- l <- length(x$edge[x$edge[, 1] == i, ][, 1])
- for (j in 1:l) {
- segments(a[x$edge[x$edge[, 1] == i, ][1, 1],
- 1], a[x$edge[x$edge[, 1] == i, 2], 2][1], a[x$edge[x$edge[,
- 1] == i, ][1, 1], 1], a[x$edge[x$edge[, 1] ==
- i, 2], 2][j])
- segments(a[x$edge[x$edge[, 1] == i, ][1, 1],
- 1], a[x$edge[x$edge[, 1] == i, 2], 2][j], a[x$edge[x$edge[,
- 1] == i, 2], 1][j], a[x$edge[x$edge[, 1] ==
- i, 2], 2][j])
- }
- }
- for (i in (N.tip.y + 1):nrow(b)) {
- l <- length(y$edge[y$edge[, 1] == i, ][, 1])
- for (j in 1:l) {
- segments(b2[y$edge[y$edge[, 1] == i, ][1, 1],
- 1], b2[y$edge[y$edge[, 1] == i, 2], 2][1],
- b2[y$edge[y$edge[, 1] == i, ][1, 1], 1], b2[y$edge[y$edge[,
- 1] == i, 2], 2][j])
- segments(b2[y$edge[y$edge[, 1] == i, ][1, 1],
- 1], b2[y$edge[y$edge[, 1] == i, 2], 2][j],
- b2[y$edge[y$edge[, 1] == i, 2], 1][j], b2[y$edge[y$edge[,
- 1] == i, 2], 2][j])
- }
- }
- }
- if (show.tip.label) {
- text(a[1:N.tip.x, ], cex = 0, font = font, pos = 4,
- labels = x$tip.label)
- text(b2[1:N.tip.y, ], cex = 1, font = font, pos = 2,
- labels = y$tip.label)
- }
-
-###links between associated taxa. Takes into account the size of the character strings of the taxa names.
- lsa <- 1:N.tip.x
- lsb <- 1:N.tip.y
- decx <- array(nrow(assoc))
- decy <- array(nrow(assoc))
- for (i in 1:nrow(assoc)) {
- if (show.tip.label) {
- decx[i] <- strwidth(x$tip.label[lsa[x$tip.label ==
- assoc[i, 1]]])
- decy[i] <- strwidth(y$tip.label[lsb[y$tip.label ==
- assoc[i, 1]]])
- } else {
- decx[i] <- decy[i] <- 0
- }
- segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + decx[i] +
- gap, a[lsa[x$tip.label == assoc[i, 1]], 2], a[lsa[x$tip.label ==
- assoc[i, 1]], 1] + gap + left, a[lsa[x$tip.label ==
- assoc[i, 1]], 2], col = col)
- segments(b2[lsb[y$tip.label == assoc[i, 2]], 1] - (decy[i] +
- gap), b2[lsb[y$tip.label == assoc[i, 2]], 2], b2[lsb[y$tip.label ==
- assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label ==
- assoc[i, 2]], 2], col = col)
- segments(a[lsa[x$tip.label == assoc[i, 1]], 1] + gap +
- left, a[lsa[x$tip.label == assoc[i, 1]], 2], b2[lsb[y$tip.label ==
- assoc[i, 2]], 1] - (gap + right), b2[lsb[y$tip.label ==
- assoc[i, 2]], 2], col = col)
- }
- if (return == TRUE)
- return(res)
-}
-## read.nexus.R (2008-06-24)
+## read.nexus.R (2008-07-04)
## Read Tree File in Nexus Format
}
if (Ntree == 1) {
trees <- trees[[1]]
- trees$tip.label <- TRANS[, 2]
+ if (translation) trees$tip.label <- TRANS[, 2]
} else {
if (!is.null(tree.names)) names(trees) <- tree.names
if (translation) attr(trees, "TipLabel") <- TRANS[, 2]
\arguments{
\item{x}{an object of class \code{"phylo"}.}
\item{y}{an object of class \code{"phylo"}.}
- \item{where}{an) integer giving the number of the node or tip of the
+ \item{where}{an integer giving the number of the node or tip of the
tree \code{x} where the tree \code{y} is binded (\code{"root"} is a
short-cut for the root).}
\item{position}{a numeric value giving the position from the tip or
\alias{consensus}
\title{Concensus Trees}
\usage{
-consensus(..., p = 1, check.labels = FALSE)
+consensus(..., p = 1, check.labels = TRUE)
}
\arguments{
\item{...}{either (i) a single object of class \code{"phylo"}, (ii) a
--- /dev/null
+\name{cophyloplot}
+\alias{cophyloplot}
+\title{Plots two phylogenetic trees face to face with links between the tips.}
+\description{
+ This function plots two trees face to face with the links if specified. It is possible to rotate the branches of each tree around the nodes by clicking.
+}
+\usage{
+cophyloplot(x, y, assoc=NULL, use.edge.length=FALSE,space=0,
+ length.line=1, gap=2, type="phylogram", rotate=FALSE,
+ col="red", show.tip.label=TRUE, font=3, \dots)
+}
+
+\arguments{
+ \item{x, y}{two objects of class \code{"phylo"}.}
+ \item{assoc}{a matrix with 2 columns specifying the associations between the tips. If NULL, no links will be drawn.}
+ \item{use.edge.length}{a logical indicating whether the branch lengths should be used to plot the trees; default is FALSE.}
+ \item{space}{a positive value that specifies the distance between the two trees.}
+ \item{length.line}{a positive value that specifies the length of the horizontal line associated to each taxa. Default is 1.}
+ \item{gap}{a value specifying the distance between the tips of the phylogeny and the lines.}
+ \item{type}{a character string specifying the type of phylogeny to be drawn; it must be one of "phylogram" (the default) or "cladogram".}
+ \item{rotate}{a logical indicating whether the nodes of the phylogeny can be rotated by clicking. Default is FALSE.}
+ \item{col}{a character string indicating the color to be used for the links. Default is red.}
+ \item{show.tip.label}{a logical indicating whether to show the tip labels on the phylogeny (defaults to 'TRUE', i.e. the labels are shown).}
+ \item{font}{an integer specifying the type of font for the labels: 1
+ (plain text), 2 (bold), 3 (italic, the default), or 4 (bold
+ italic).}
+ \item{\dots}{(unused)}
+}
+\details{
+The aim of this function is to plot simultaneously two phylogenetic trees with associated taxa. The two trees do not necessarily have the same number of tips and more than one tip in one phylogeny can be associated with a tip in the other.
+
+The association matrix used to draw the links has to be a matrix with two columns containing the names of the tips. One line in the matrix represents one link on the plot. The first column of the matrix has to contain tip labels of the first tree (\code{phy1}) and the second column of the matrix, tip labels of the second tree (\code{phy2}). There is no limit (low or high) for the number of lines in the matrix. A matrix with two colums and one line will give a plot with one link.
+
+Arguments \code{gap}, \code{length.line} and \code{space} have to be changed to get a nice plot of the two phylogenies. Note that the function takes into account the length of the character strings corresponding to the names at the tips, so that the lines do not overwrite those names.
+
+The \code{rotate} argument can be used to transform both phylogenies in order to get the more readable plot (typically by decreasing the number of crossing lines). This can be done by clicking on the nodes. The escape button or right click take back to the console.
+}
+\author{Damien de Vienne \email{damien.de-vienne@u-psud.fr}}
+\seealso{
+ \code{\link{plot.phylo}}, \code{\link{rotate}}
+}
+\examples{
+#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
+\dontrun{
+cophyloplot(tree1, tree2, assoc=association, length.line=4, space=28, gap=3, rotate=TRUE)
+}
+}
+\keyword{hplot}
\name{makeLabel}
\alias{makeLabel}
+\alias{makeLabel.character}
+\alias{makeLabel.phylo}
+\alias{makeLabel.multiPhylo}
+\alias{makeLabel.DNAbin}
\title{Label Management}
\usage{
makeLabel(x, ...)
makeLabel(x, len = 3) # made unique and of length 3
makeLabel(x, len = 3, make.unique = FALSE)
}
+\keyword{manip}
+++ /dev/null
-\name{plot.cophylo}
-\alias{plot.cophylo}
-\title{Plots two phylogenetic trees face to face with the links between the tips.}
-\description{
- This function plots two trees face to face with the links if specified. It is possible to rotate the branches of each tree around the nodes by clicking.
-}
-\usage{
-plot.cophylo(x, y, assoc=NULL, use.edge.length=FALSE,space=0,
-length.line=1, gap=2, type="phylogram", rotate=FALSE, col="red",
-show.tip.label=TRUE, font=3, \dots)
-}
-
-\arguments{
- \item{x, y}{two objects of class \code{"phylo"}.}
- \item{assoc}{a matrix with 2 columns specifying the associations between the tips. If NULL, no links will be drawn.}
- \item{use.edge.length}{a logical indicating whether the branch lengths should be used to plot the trees; default is FALSE.}
- \item{space}{a positive value that specifies the distance between the two trees.}
- \item{length.line}{a positive value that specifies the length of the horizontal line associated to each taxa. Default is 1.}
- \item{gap}{a value specifying the distance between the tips of the phylogeny and the lines.}
- \item{type}{a character string specifying the type of phylogeny to be drawn; it must be one of "phylogram" (the default) or "cladogram".}
- \item{rotate}{a logical indicating whether the nodes of the phylogeny can be rotated by clicking. Default is FALSE.}
- \item{col}{a character string indicating the color to be used for the links. Default is red.}
- \item{show.tip.label}{a logical indicating whether to show the tip labels on the phylogeny (defaults to 'TRUE', i.e. the labels are shown).}
- \item{font}{an integer specifying the type of font for the labels: 1
- (plain text), 2 (bold), 3 (italic, the default), or 4 (bold
- italic).}
- \item{\dots}{(unused)}
-}
-\details{
-The aim of this function is to plot simultaneously two phylogenetic trees with associated taxa. The two trees do not necessarily have the same number of tips and more than one tip in one phylogeny can be associated with a tip in the other.
-
-The association matrix used to draw the links has to be a matrix with two columns containing the names of the tips. One line in the matrix represents one link on the plot. The first column of the matrix has to contain tip labels of the first tree (\code{phy1}) and the second column of the matrix, tip labels of the second tree (\code{phy2}). There is no limit (low or high) for the number of lines in the matrix. A matrix with two colums and one line will give a plot with one link.
-
-Arguments \code{gap}, \code{length.line} and \code{space} have to be changed to get a nice plot of the two phylogenies. Note that the function takes into account the length of the character strings corresponding to the names at the tips, so that the lines do not overwrite those names.
-
-The \code{rotate} argument can be used to transform both phylogenies in order to get the more readable plot (typically by decreasing the number of crossing lines). This can be done by clicking on the nodes. The escape button or right click take back to the console.
-}
-\author{Damien de Vienne \email{damien.de-vienne@u-psud.fr}}
-\seealso{
- \code{\link{plot.phylo}}, \code{\link{rotate}}
-}
-\examples{
-#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
-plot.cophylo(tree1, tree2, assoc=association, length.line=4, space=28, gap=3)
-
-#plot with rotations
-plot.cophylo(tree1, tree2, assoc=association, length.line=4, space=28, gap=3, rotate=TRUE)
-
-}
-\keyword{hplot}