Re: [R] plot bg color in Mac OSX

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Sat 03 Dec 2005 - 07:11:06 EST

On 12/2/05, Peter Rich <pjrich@gmail.com> wrote:
> Hi,
> I am running R on my iBook (OS X 10.4) and whenever I try and plot a
> model that has been run, I get a grey background. This makes the plot
> difficult to read on b&w printouts. I have tried changing the background
> to
> white (or any other color) without any success. Here's a current example
>
> plot(augPred(m2corn.nlme, level=0:1), bg="transparent", lty=c(1,4), pch=19,
> cex=.75,new=TRUE)
> plot(augPred(m3corn.nlme, level=0:1), lty=c(1,4), pch=19, new=TRUE)
>
> Notice that if I run this code at the same time, there are some par
> arguments that work as I would expect and others that seem to have no
> effect. For example, bg="transparent" and new=TRUE both seem to be
> ignored. This is annoying because teh grey background makes light colors
> difficult to see. Additionally, I would like new=TRUE to work so that I can
> actually create these two plots at the same time. Any ideas on how to get
> this to work?

Most nlme plots are Trellis plots (using the lattice package), where traditional graphics rules don't apply. You need to read up on lattice. ?lattice would be a good start.

-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 Dec 03 12:27:07 2005

This archive was generated by hypermail 2.1.8 : Sat 03 Dec 2005 - 14:28:16 EST