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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 8 10:53:20 CEST 2008


Author: pdc
Date: 2008-08-08 10:53:20 +0200 (Fri, 08 Aug 2008)
New Revision: 275

Modified:
   branches/pdcgsoc/R/treePlot.R
Log:
rotation of tip.plot.fun() plots also

Modified: branches/pdcgsoc/R/treePlot.R
===================================================================
--- branches/pdcgsoc/R/treePlot.R	2008-08-08 08:45:01 UTC (rev 274)
+++ branches/pdcgsoc/R/treePlot.R	2008-08-08 08:53:20 UTC (rev 275)
@@ -52,7 +52,7 @@
     if(!plot.data) {
         phyplotlayout <- grid.layout(nrow = 1, ncol = 1)
         pushViewport(viewport(width = width, height = height, 
-                            layout = phyplotlayout, 
+                            layout = phyplotlayout, angle = rot,
                             name = "phyplotlayout"))
             pushTree(row = 1, col = 1)
         upViewport()
@@ -106,7 +106,7 @@
                 )
             # TODO this is done multiple times, 
             pushViewport(viewport(width = width, height = height, 
-                                layout = datalayout, 
+                                layout = datalayout, angle = rot,
                                 name = 'datalayout'))
             pushViewport(viewport(
                 yscale = c(-0.5/Ntips, 1 + 0.5/Ntips), 
@@ -118,12 +118,13 @@
             for(i in 1:Ntips) {
                 pushViewport(viewport(
                     y = xxyy$yy[phy at edge[, 2] == i],
-                    x = 1, # xxyy$xx[phy at edge[, 2] == i], 
+                    x = 1 + 1/(2 * Ntips), # xxyy$xx[phy at edge[, 2] == i], 
                     height = hc, 
                     width = hc, 
                     # default.units = 'native', 
                     name = paste('data_plot', i),
-                    just = "left"
+                    just = "center",
+                    angle = -rot
                     ))
                     #grid.rect()
                     tip.plot.fun(t(tdata(phy, which = 'tip')[i, ]))
@@ -191,7 +192,7 @@
     pushViewport(viewport(
         x = 0.5, y = 0.5, 
         width = 1, height = 1, 
-        layout = treelayout, name = 'treelayout', angle = rot))
+        layout = treelayout, name = 'treelayout'))
     pushViewport(viewport(
         layout = treelayout, layout.pos.col = 1, 
         name = 'tree'))



More information about the Phylobase-commits mailing list