[R]printing from treillis.device

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Jun 25 19:30:51 CEST 2001


On Mon, 25 Jun 2001, Peter Malewski wrote:

> On Mon, Jun 25, 2001 at 04:53:17PM +0100, Didier Leibovici wrote:
> > Hi,
> > I was using xyplot
> > and had problems in printing (on a postscript file)
> > when there was
> > a session
> > like
> > xyplot(....)
> > par(new=T)
> > xyplot(....)
> >
> > after a print the result is that the ps contains only he last
> > xyplot!
> > any obvious things to do?
> > thanks
> > Didier
>
> According to Prof.Ripley it isn't a good idea to copy a trellis.device
> to another device (eg printer). See the posting at the r-help
> archive.

(Yes, but he is plotting on a postscript device).

> If you really want that you can
>
> xyplot(...,page=function(i)dev.print(...,file=paste("/tmp/tmp",i,".ps",sep="")))
>
> see ?trellis.args.
>
> btw: Lattice is under development.

I think Didier's probelm is mixing GRZ-style and trellis-style graphics.
That is, par(new=T) does not do what he wants.

If you want to print a Trellis plot (that is what you do), and then add
another you need to use the `more' argument to print.trellis.

That is

print(xyplot(....), more=T)
xyplot(....)

works in the original, and looks like it should work in lattice too.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list