On 8/5/09, pomc...@free.fr <pomc...@free.fr> wrote: > Hi Deepayan, > > Thank for you reply. > I am a little bit confused now. In the one hand, the trellis.device function > has lost his bg argument as explained in the Note section of ?trellis.device, > but the background info provided by a theme does not seem to impact the > background of the device. In the other hand, png has a bg argument that works > great but no "theme" capabilities as far as I could see. > > Do you see a way to reconcile both sides of the problem?
There's no conflict. The "bg" argument of png() (and most other devices) is a "canvas color" that is handled by the device driver. The lattice "background" setting controls a background rectangle plotted by lattice: png("foo.png", bg = "transparent") xyplot(1 ~ 1, par.settings = list(background = list(col = "yellow"))) dev.off() Obviously, plotting a transparent rectangle over a white canvas (which you were effectively doing) will not make the canvas transparent. -Deepayan ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.