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

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

On 7/15/05, Chuck Cleland <ccleland@optonline.net> wrote:

> ftorrei2@uiuc.edu 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



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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