[Phylobase-commits] r207 - branches/pdcgsoc/misc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 21 07:37:36 CEST 2008


Author: pdc
Date: 2008-07-21 07:37:36 +0200 (Mon, 21 Jul 2008)
New Revision: 207

Modified:
   branches/pdcgsoc/misc/temp.R
Log:
branch color and width arguments

Modified: branches/pdcgsoc/misc/temp.R
===================================================================
--- branches/pdcgsoc/misc/temp.R	2008-07-21 05:35:36 UTC (rev 206)
+++ branches/pdcgsoc/misc/temp.R	2008-07-21 05:37:36 UTC (rev 207)
@@ -7,11 +7,15 @@
                      tip.order = NULL,
                      plot.data = FALSE,
                      rot = 0,
-                     tip.plot.fun = function() {grid.lines(1:10/10, rnorm(10, sd = .2, mean = .5))}
+                     tip.plot.fun = function() {grid.lines(1:10/10, rnorm(10, sd = .2, mean = .5))},
+                     edge.color = 'black', ## TODO colors for branhes and nodes seperately?
+                     node.color = 'black',
+                     lwd = 1 ## TODO currently only one width is allowed allow many?
                      ## tip.plot.fun = function() {}
             )
     {
     
+    
     if (type == 'phylogram') {
         xxyy <- phyloXXYY(phy, tip.order)
         ## because we may reoder the tip, we need to update the phy objec
@@ -92,11 +96,11 @@
     grid.segments( # draws vertical lines
         x0 = segs$v0x, y0 = segs$v0y, 
         x1 = segs$v1x, y1 = segs$v1y, 
-        name = "vert") #, gp = gpar(col = color.v, lwd = width.v)) 
+        name = "vert", gp = gpar(col = node.color, lwd = lwd)) 
     grid.segments(  # draws horizontal lines
         x0 = segs$h0x, y0 = segs$h0y, 
         x1 = segs$h1x, y1 = segs$h1y, 
-        name = "horz") #, gp = gpar(col = edge.color, lwd = edge.width))
+        name = "horz", gp = gpar(col = edge.color, lwd = lwd))
     popViewport()
 }
 
@@ -214,4 +218,4 @@
 ##     nrow(geospiza at tip.data))/ncol(geospiza at tip.data) - .2, 
 ##     y = scale(geospiza at tip.data))
 
-treePlot(geospiza, plot.data = TRUE)
+treePlot(geospiza, plot.data = TRUE, edge.color = c('red', 'blue'))



More information about the Phylobase-commits mailing list