Re: [R] pdf() black&white; panel titles in lattice

From: Deepayan Sarkar <>
Date: Sat 16 Jul 2005 - 06:01:39 EST

On 7/15/05, Chuck Cleland <> wrote:

> wrote:
> > Thank you so much for your help. Now I think I can use R for
> > everything I need so far. However I think that I haven't found
> > a solution for my first question. trellis.device(color=F) only
> > affects the trellis device, but not the pdf device, doesn´t
> > it? At least that is my impression. I manage to get black and
> > white graphics in trellis, but whenever I switch on the pdf
> > device, the resulting pdf file is in color, even if I specify
> > pdf(X.pdf, bg="white", fg="black") (I wonder what the use of
> > bg and fg is). The thing is that I need black and white
> > graphics for my papers. I am using R on OSX. Does this happen
> > to anyone else?
> Call trellis.device() after pdf() and use new=FALSE in trellis.device().
> pdf("c:/myfolder/myfigures.pdf")
> trellis.device(new=FALSE, col=FALSE)

That will work too, but the intended usage of trellis.device as a wrapper for any device, including pdf. E.g.,

trellis.device(pdf, file = "foo.pdf", color = FALSE)

Deepayan mailing list PLEASE do read the posting guide! Received on Sat Jul 16 06:06:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:45 EST