X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=R%2Fplot.phylo.R;fp=R%2Fplot.phylo.R;h=4c23c6f0032361e6c3b6181941cbfd4c83ad3f24;hb=2014b83971be4b9cd1644d6127837df798e9335c;hp=862291de6ccd885bddeaa5a40f09a70f87a8a1ee;hpb=da67dccb93d35408baa48b141fcda921772c8b9c;p=ape.git diff --git a/R/plot.phylo.R b/R/plot.phylo.R index 862291d..4c23c6f 100644 --- a/R/plot.phylo.R +++ b/R/plot.phylo.R @@ -1,4 +1,4 @@ -## plot.phylo.R (2012-10-02) +## plot.phylo.R (2012-10-20) ## Plot Phylogenies @@ -18,8 +18,8 @@ plot.phylo <- tip.color = "black", plot = TRUE, rotate.tree = 0, ...) { Ntip <- length(x$tip.label) - if (Ntip == 1) { - warning("found only one tip in the tree") + if (Ntip < 2) { + warning("found less than 2 tips in the tree") return(NULL) } if (any(tabulate(x$edge[, 1]) == 1)) @@ -421,7 +421,7 @@ phylogram.plot <- function(edge, Ntip, Nnode, xx, yy, horizontal, yy <- xx xx <- tmp } - ## un trait vertical à chaque noeud... + ## un trait vertical a chaque noeud... x0v <- xx[nodes] y0v <- y1v <- numeric(Nnode) ## store the index of each node in the 1st column of edge: