[R] printing lattice plots

Prof Brian D Ripley ripley at stats.ox.ac.uk
Mon Aug 13 21:50:35 CEST 2001


On Mon, 13 Aug 2001, Claudia Tebaldi wrote:

> Hi
>
> I'm trying to print several plots to a multi-page postscript file.
> Some plots are output of basic commands, some are produced by "trellis"
> commands (from the package lattice).

That is not a good idea, and not supported under S, so I doubt if it will
be under R.  Write the pages separately and combine.  Basically a
single postscript file is from a single device session, and you want to
mix sessions.

> Right now I'm not able to get a straightforward black and white color
> scheme for the latter kind: when I open the postscript file the "trellis"
> plots are invisible, or parts of them are (usually the bounding
> box/axes/axes marks).
>
> Here is a sample set of lines:
>
> postscript(file="pix1.ps")
> par(mfrow=c(2,2))
> plot(X,Y)
> plot(X1,Y1)
> plot(X2,Y2)
>
> par(mfrow=c(1,1))
>
> bwplot(cut(X)~Y)
> bwplot(cut(X1)~Y1)
>
> dev.off()
>
> I've tried changing the trellis.settings$...$col items to "black"
> or specifying trellis.device(color=FALSE,device="postscript"). No luck.

(Eventually that may work, sort of.)

> On a related note, is there a way to have multiple trellis plots on a same
> page?

?print.trellis has examples ....

-- 
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