]> git.donarmstrong.com Git - ape.git/commitdiff
a few bug fixes especially in plot.phylo()
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 11 Feb 2011 12:54:50 +0000 (12:54 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 11 Feb 2011 12:54:50 +0000 (12:54 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@145 6e262413-ae40-0410-9e79-b911bd7a66b7

ChangeLog
DESCRIPTION
R/plot.phylo.R
man/as.matching.Rd
man/read.tree.Rd

index a4985e5dfcc71b19f3d191007abe15da6ec9bbab..8480ce8d82dec01af58e8f2dba26fcf09b40c9b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,11 +17,18 @@ BUG FIXES
     o read.dna(, "fasta") failed if sequences were not all of the same
       length.
 
+    o plot.phylo() did not recycle values of 'font', 'cex' and
+      'tip.color' correctly when type = "fan" or "radial".
+
 
 OTHER CHANGES
 
     o In drop.fossil() the default tol = 0 has been raised to 1e-8.
 
+    o The help command ?phylo now points to the man page of read.tree()
+      where this class is described. Similarly, ?matching points to the
+      man page of as.matching().
+
 
 
                CHANGES IN APE VERSION 2.6-2
index c3f4954717e7867f561c4641ae534185b64cda1b..17dfadf79278dfd6c08e38cba013b2a98073f61c 100644 (file)
@@ -1,6 +1,6 @@
 Package: ape
 Version: 2.6-3
-Date: 2011-02-01
+Date: 2011-02-11
 Title: Analyses of Phylogenetics and Evolution
 Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Klaus Schliep, Korbinian Strimmer, Damien de Vienne
 Maintainer: Emmanuel Paradis <Emmanuel.Paradis@ird.fr>
index df246bd7399787afb9294fcf3e7d5f029889142e..69f08660f1afa189e9461ed00f51b330d78baf71 100644 (file)
@@ -1,8 +1,8 @@
-## plot.phylo.R (2010-08-12)
+## plot.phylo.R (2011-02-11)
 
 ##   Plot Phylogenies
 
-## Copyright 2002-2010 Emmanuel Paradis
+## Copyright 2002-2011 Emmanuel Paradis
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -359,9 +359,13 @@ plot.phylo <- function(x, type = "phylogram", use.edge.length = TRUE,
                 srt <- 180*XY$axe/pi
                 srt[as.logical(adj)] <- srt[as.logical(adj)] - 180
                 ## `srt' takes only a single value, so can't vectorize this:
+                ## (and need to 'elongate' these vectors:)
+                font <- rep(font, length.out = Ntip)
+                tip.color <- rep(tip.color, length.out = Ntip)
+                cex <- rep(cex, length.out = Ntip)
                 for (i in 1:Ntip)
-                  text(xx[i], yy[i], cex = cex, x$tip.label[i], adj = adj[i],
-                       font = font, srt = srt[i], col = tip.color[i])
+                  text(xx[i], yy[i], cex = cex[i], x$tip.label[i], adj = adj[i],
+                       font = font[i], srt = srt[i], col = tip.color[i])
             }
         }
         if (type %in% c("fan", "radial")) {
@@ -373,8 +377,12 @@ plot.phylo <- function(x, type = "phylogram", use.edge.length = TRUE,
             adj <- numeric(Ntip)
             adj[xx.tips < 0] <- 1
             ## `srt' takes only a single value, so can't vectorize this:
+            ## (and need to 'elongate' these vectors:)
+            font <- rep(font, length.out = Ntip)
+            tip.color <- rep(tip.color, length.out = Ntip)
+            cex <- rep(cex, length.out = Ntip)
             for (i in 1:Ntip)
-                text(xx[i], yy[i], x$tip.label[i], font = font, cex = cex,
+                text(xx[i], yy[i], x$tip.label[i], font = font[i], cex = cex[i],
                      srt = angle[i], adj = adj[i], col = tip.color[i])
         }
     }
index 8a156c64507e5799ac729223da620687149a007d..ece8f32942bf49929bf68c5b5dc280f43e36d80b 100644 (file)
@@ -1,5 +1,6 @@
 \name{as.matching}
 \alias{as.matching}
+\alias{matching}
 \alias{as.matching.phylo}
 \alias{as.phylo.matching}
 \title{Conversion Between Phylo and Matching Objects}
index 1bf915cd8656ae2862457f8865806b473ff17f83..5e31c55cc330fb418cd01ca371b4bf02761d0cc5 100644 (file)
@@ -1,5 +1,6 @@
 \name{read.tree}
 \alias{read.tree}
+\alias{phylo}
 \title{Read Tree File in Parenthetic Format}
 \usage{
 read.tree(file = "", text = NULL, tree.names = NULL, skip = 0,