Displaying 1 result from an estimated 1 matches for "yran".
Did you mean:
ran
2012 Oct 19
1
grid(Base): How to avoid "Figure region too small and/or viewport too large" by specifying 'relative' units?
...ummy data to plot in the four sub-plots
n <- 10
x <- array(NA, dim=c(nx, ny, n))
for(i in 1:2) for(j in 1:2) x[i,j,] <- rep(i,n)+rep(j,n)+runif(n)
## go through the "panels"
set.seed(1)
for(i in 1:nx) { # rows
i. <- 2*i # column index in layout (for jumping over gaps)
yran <- range(x[i,,]) # for forcing the same y-axis within a row
for(j in 1:ny) { # columns
j. <- 2*j # row index in layout (for jumping over gaps)
pushViewport(viewport(layout.pos.row=i., layout.pos.col=j.))
## plot
par(plt=gridPLT()) # start a 'graphics...