[R] Reset trellis plot backgroud color

Deepayan Sarkar deepayansarkar at yahoo.com
Fri Nov 30 08:03:07 CET 2001



The device that starts up by default is not meant for
printing; for that you should explicitly start a new
device. And this should be done by calling the
trellis.device() function. This function has a
parameter called bg. So, to start a pdf device with a
white background, try

trellis.device("pdf", bg = "white")

Just calling 

trellis.device(bg = "white")

should start a windows() device with a white
background, if that's what you want.



--- "Yang, Richard" <dyang at nrcan.gc.ca> wrote:
> Hello,
> 
> I run R on Windows 2000. When I load lattice library
> and plot some lme class
> objects, the graphic window displays a dark-green
> color. Graphics look ok on
> the screen, but lines and points become invisible
> whem I send the plot to a
> printer because of the background color. Are there
> ways to reset the
> background color? Both par(bg=) and windows() do not
> work. Any ideas?
> 
> 
> Richard
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read
> http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To:
> r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

__________________________________________________



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list