[R] Howto Supress Extra Blank Page in gridBase

Gundala Viswanath gundalav at gmail.com
Fri Mar 20 06:09:07 CET 2009


Dear all,

I have a simple plot using "gridBase" like this.

The problem occurs whenever I execute this code
there is always a blank page created before the actual plot.

How can we disable that blank page?

I am using: R version 2.7.2 (2008-08-25)
and  gridBase version: 0.4-3

__ BEGIN__
library(grid)
library(gridBase)
opar <- par(no.readonly=TRUE)

par(opar)
grid.newpage()
pushViewport(viewport(width=0.5, height=0.5))
grid.rect(gp=gpar(col="grey", lty="dashed"))
par(omi=gridOMI())
par(mfrow=c(2, 2), mfg=c(1, 1), mar=c(3, 3, 1, 0))
for (i in 1:4) {
plot(1:10)
}
__ END__

- Gundala Viswanath
Jakarta - Indonesia




More information about the R-help mailing list