[Phylobase-commits] r268 - branches/pdcgsoc/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Aug 7 06:04:53 CEST 2008


Author: pdc
Date: 2008-08-07 06:04:53 +0200 (Thu, 07 Aug 2008)
New Revision: 268

Modified:
   branches/pdcgsoc/R/treePlot.R
Log:
place node labels properly

Modified: branches/pdcgsoc/R/treePlot.R
===================================================================
--- branches/pdcgsoc/R/treePlot.R	2008-08-07 01:38:48 UTC (rev 267)
+++ branches/pdcgsoc/R/treePlot.R	2008-08-07 04:04:53 UTC (rev 268)
@@ -218,11 +218,12 @@
         pushViewport(viewport(
             layout = treelayout, layout.pos.col = 1, 
             ))
+            rty <- mean(xxyy$yy[phy at edge[, 1] == Ntips + 1])
         labtext <- grid.text(
-            phy at node.label[nindex], 
-            x = xxyy$xx[phy at edge[, 2] > Ntips], 
+            phy at node.label, 
+            x = c(0, xxyy$xx[phy at edge[, 2] > Ntips][nindex]), 
             ## TODO yuck!!
-            y = xxyy$yy[phy at edge[, 2] > Ntips], 
+            y = c(rty, xxyy$yy[phy at edge[, 2] > Ntips][nindex]), 
             default.units = 'npc', 
             rot = rot, just = 'left', gp = gpar(col = node.color[nindex])
         )



More information about the Phylobase-commits mailing list