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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 12 07:57:34 CEST 2008


Author: pdc
Date: 2008-08-12 07:57:34 +0200 (Tue, 12 Aug 2008)
New Revision: 279

Modified:
   branches/pdcgsoc/R/treePlot.R
Log:
background grid now optional

Modified: branches/pdcgsoc/R/treePlot.R
===================================================================
--- branches/pdcgsoc/R/treePlot.R	2008-08-12 05:54:59 UTC (rev 278)
+++ branches/pdcgsoc/R/treePlot.R	2008-08-12 05:57:34 UTC (rev 279)
@@ -360,7 +360,7 @@
     get.coor(troot, segs)
 }
 
-phylobubbles <- function(XXYY, square = FALSE) {
+phylobubbles <- function(XXYY, square = FALSE, grid = TRUE) {
     ## TODO remove data transformation from phylobubbles
     ## TODO add legend command
     phy <- XXYY$phy
@@ -406,8 +406,12 @@
         layout.pos.col = 1, 
         layout.pos.row = 1
     ))
-    grid.segments(x0 = 0,  x1 = 1, y0 = tys, y1 = tys, gp = gpar(col = 'grey'))
-    grid.segments(x0 = xpos,  x1 = xpos, y0 = 0, y1 = 1, gp = gpar(col = 'grey'))
+    if(grid) {
+        grid.segments(x0 = 0,   x1 = 1, 
+                      y0 = tys, y1 = tys, gp = gpar(col = 'grey'))
+        grid.segments(x0 = xpos, x1 = xpos, 
+                      y0 = 0,    y1 = 1, gp = gpar(col = 'grey'))
+    }    
     if (length(naxs) > 0) {
         grid.points(naxs, nays, pch = 4)
     }



More information about the Phylobase-commits mailing list