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
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 >Hi Paul, This method calls lattice plots. An easy way to change the bg color is to call trellis.device explictely, e.g. trellis.device(bg = 0) plot(<grouped data object>) Best, Renaud -- Dr Renaud Lancelot, v?t?rinaire CIRAD, D?partement Elevage et M?decine V?t?rinaire (CIRAD-Emvt) Programme Productions Animales http://www.cirad.fr/fr/pg_recherche/page.php?id=14 ISRA-LNERV tel +221 832 49 02 BP 2057 Dakar-Hann fax +221 821 18 79 (CIRAD) Senegal e-mail renaud.lancelot at cirad.fr
Thank you both for pointing out that this is a lattice plot (ie, R's version of Trellis graphics) and therefore needs something other than par(). I was able to use IE6.0 to search for "trellis" and find the relevant commands (after using help.start(), of course). This brings up another question: Is there a convenient way to decide whether or not the generic plot( ) is going to use "regular" or "trellis" plotting? I looked at methods(plot) and didn't find any groupedData plot methods listed, so perhaps this is the clue? -david paul
"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-helpI 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