Re: [R] Background color(s) for groupedData plot
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 __ [EMAIL PROTECTED] 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 [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] Background color(s) for groupedData plot
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 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Background color(s) for groupedData plot
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 __ [EMAIL PROTECTED] 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 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] Background color(s) for groupedData plot
Paul, == Paul, David A [EMAIL PROTECTED] writes: 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? It's there, but as the GroupedData methods, not groupedData. require(nlme) methods(plot)[grep('groupedData',methods(plot),ignore.case=T)] [1] plot.nffGroupedData plot.nfnGroupedData plot.nmGroupedData Mike __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help