[R] gray background in png

Sundar Dorai-Raj sundar.dorai-raj at PDF.COM
Sun Jul 18 04:13:53 CEST 2004

Hi all,
   I'm having a problem creating png images with trellis.device. I would 
like to create many plots with a white background using a sequence 
number in the file argument (i.e. "%02d"). The first plot is as expected 
with a white background. However, the second and all subsequent plots 
have a gray background. I would like all plots to have a white (or 
transparent) background. Below is an example:

z <- expand.grid(A = LETTERS[1:8], B = letters[1:6])
z$x <- z$y <- rep(1, nrow(z))
trellis.device(png, file = "test%02d.png", bg = "white")
xyplot(y ~ x | A * B, data = z, layout = c(4, 6))

This is also the case for jpeg and bmp though win.metafile and 
postscript do not have this problem. Is this a bug or am I missing 
something obvious?

I found one reference that implies this may be expected behaviour but 
I'm not sure if I interpretted the comment correctly.


 > R.version
platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
major    1
minor    9.1
year     2004
month    06
day      21
language R
 > help(package = lattice)

		Information on Package 'lattice'


Package: lattice
Version: 0.9-12
Date: 2004/06/01

More information about the R-help mailing list