Skip to content
Prev 76212 / 398502 Next

Shutting down a trellis plot (was R-help Digest, Vol 30, Issue 26)

I suspect you have not print()-ed your graphics, see FAQ Q7.22.

It is then possible to include dev.off() within the function.  E.g.

testit <- function(fn = "test.eps")
{
   trellis.device(postscript, file=fn, onefile = FALSE, horizontal=FALSE)
   print(stripplot(voice.part ~ jitter(height), data = singer, aspect = 1,
                   jitter = TRUE, xlab = "Height (inches)"))
   dev.off()
}

testit()

works for me.
On Fri, 26 Aug 2005, Jean-Marc Ottorini wrote: