[R] Background color(s) for groupedData plot

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Jun 19 21:28:02 CEST 2003



"Paul, David A" wrote:
> 
> I've been using par() to check the graphics parameters
> associated with both plot(<fitted linear model>) and
> plot(<grouped data object>).  AFAIK the only differences
> are in the $cxy, $usr, $xaxp, and $yaxp parameters but
> the background color for the grouped data plot is grey
> while the linear model plot has a white background.
> 
> When I've tried par(bg = "white") prior to using the
> plot(<grouped data object>) command it doesn't seem to make any
> difference.
> 
> How can I change the grey background to something else?
> 
> Much thanks in advance,
>   David Paul
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help


I guess you are using package nlme.
Plots for the different GroupedData classes are produced with package
lattice.
So you cannot use par(). See the documentation for package lattice.

After you have opened a device, you might want to use
  lset(col.whitebg())

or simply look into ?trellis.device how to set black and white schemes
and so on.

Uwe Ligges




More information about the R-help mailing list