[Phylobase-commits] r418 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 1 03:36:21 CET 2009


Author: bbolker
Date: 2009-01-01 03:36:20 +0100 (Thu, 01 Jan 2009)
New Revision: 418

Modified:
   pkg/man/tree.plot.Rd
Log:
  added example of two plots on a single page



Modified: pkg/man/tree.plot.Rd
===================================================================
--- pkg/man/tree.plot.Rd	2008-12-31 20:12:50 UTC (rev 417)
+++ pkg/man/tree.plot.Rd	2009-01-01 02:36:20 UTC (rev 418)
@@ -20,9 +20,6 @@
   \item{edge.width}{ A vector in the order of \code{edges(phy)} indicating the widths of edge lines}
   \item{rot}{ Numeric indicating the rotation of the plot in degrees }
 }
-% \details{
-%   ~~ If necessary, more details than the description above ~~
-% }
 \value{
 Returns no values, function invoked for the plotting side effect.}
 
@@ -48,6 +45,19 @@
 )
 popViewport()
 
+## example of plotting two grid plots on the same page
+geotree <- extractTree(geospiza)
+geotree2 <-
+prune(geotree,descendants(geotree,MRCA(geotree,c("difficilis","scandens"))),
+subtree=TRUE)
+  grid.newpage()
+  pushViewport(viewport(layout=grid.layout(nrow=1,ncol=2),name="base"))
+  pushViewport(viewport(layout.pos.col=1,name="plot1"))
+  plot(geotree,newpage=FALSE)
+  popViewport()
+  pushViewport(viewport(layout.pos.col=2,name="plot2"))
+  plot(geotree2,newpage=FALSE,rot=180)
+  popViewport()
 }
 
 \keyword{methods}



More information about the Phylobase-commits mailing list