On 4/11/07, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: > > Hi, Deepayan, > > See the attached image for what your code produced. Not sure if this is > what you intended.
Here's the correct version of callAfterMoving (I thought I had fixed it, but I guess I pasted the wrong thing): ## this calls 'fun' after moving its viewport if panel.number() == 5 callAfterMoving <- function(fun, border = TRUE, move.x = 1, ...) { if (panel.number() != 5) { ## was == 5 fun(...) if (border) grid.rect() } else { cpl <- current.limits() pushViewport(viewport(x = move.x, width = unit(1, "npc"), xscale = cpl$xlim, yscale = cpl$ylim, clip = "off")) fun(...) if (border) grid.rect() upViewport() } } -Deepayan ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.