[Phylobase-commits] r265 - branches/pdcgsoc/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Aug 7 02:17:56 CEST 2008
Author: skembel
Date: 2008-08-07 02:17:56 +0200 (Thu, 07 Aug 2008)
New Revision: 265
Modified:
branches/pdcgsoc/R/treePlot.R
Log:
base graphics interface for treePlot
Modified: branches/pdcgsoc/R/treePlot.R
===================================================================
--- branches/pdcgsoc/R/treePlot.R 2008-08-06 23:20:18 UTC (rev 264)
+++ branches/pdcgsoc/R/treePlot.R 2008-08-07 00:17:56 UTC (rev 265)
@@ -53,6 +53,14 @@
}
if(plot.data) {
+ if(tip.plot.fun == "density") {
+ tmin <- min(tdata(phy, which = 'tip'))
+ tmax <- max(tdata(phy, which = 'tip'))
+ tip.plot.fun <- function(x) {
+ par(plt=gridFIG(),new=TRUE)
+ plot(density(t(x)),xlim=c(tmin,tmax))
+ }
+ }
if(is.function(tip.plot.fun)) {
datalayout <- grid.layout(ncol = 2,
width = unit(c(1, 1/Ntips), c('null', 'null'))
@@ -84,7 +92,7 @@
name = paste('data_plot', i),
just = "left"
))
- grid.rect()
+ #grid.rect()
tip.plot.fun(t(tdata(phy, which = 'tip')[i, ]))
upViewport()
}
More information about the Phylobase-commits
mailing list