Re: [R] gray background in png

From: Andrew Criswell <r-stats_at_arcriswell.com>
Date: Mon 19 Jul 2004 - 03:17:54 EST

Hello:

I was able to get two graphs with white background in JPG format, but only the first graph with PNG format (as previously remarked). Curiously, I only got the first graph saved (with white background) for the PDF format. Code follows...

ANDREW library(lattice)
z <- expand.grid(A = LETTERS[1:8], B = letters[1:6]) z$x <- z$y <- rep(1, nrow(z))

png(file = "~/tmp/test%02d.png")
lset(theme = col.whitebg())
xyplot(y ~ x | A * B, data = z, layout = c(4, 6)) dev.off()

jpeg(file = "~/tmp/test%02d.jpg")
lset(theme = col.whitebg())
xyplot(y ~ x | A * B, data = z, layout = c(4, 6)) dev.off()

pdf(file = "~/tmp/test%02d.pdf")
lset(theme = col.whitebg())
xyplot(y ~ x | A * B, data = z, layout = c(4, 6)) dev.off()

> version

platform i686-pc-linux-gnu

arch     i686
os       linux-gnu

system i686, linux-gnu
status
major 1
minor 9.0
year 2004
month 04
day 12
language R

R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 19 03:25:57 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:04 EST