Wow! Thanks to Sundar and to Deepayan for this selfless effort.(I rather suspect they had a good time figuring this out.) The outcome is that I will be able to publish just the right figure for the job. I will be sure to aknowledge your contribtution.
Michael On Apr 12, 2007, at 12:48 AM, Deepayan Sarkar wrote: > 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 ______________________________________________ [EMAIL PROTECTED] 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.