Re: [R] no transparent background in bmp

About this list Date view Thread view Subject view Author view Attachment view

From: Deepayan Sarkar (deepayan@stat.wisc.edu)
Date: Fri 28 May 2004 - 09:16:56 EST


Message-id: <200405271816.56677.deepayan@stat.wisc.edu>

On Thursday 27 May 2004 17:24, Jeff D. Hamann wrote:
> I've been attempting to export a graphics file of my lattice plots
> and no matter what color I use for the bg= argument in the
> bmp/jpeg/png function, the background is grey.
>
> bmp(filename = "c:/my_paper/resids.bmp", width=1024, height=1024,
> pointsize=10, bg="transparent")

This doesn't affect lattice's own settings, which is what's going to be
used. You should instead use

trellis.device(bmp,
               filename = "c:/my_paper/resids.bmp",
               width=1024, height=1024,
               pointsize=10, # probably useless
               bg="transparent")

or call

lset(list(background = list(col = "transparent")))

after the bmp device is opened using bmp() directly.

(this works for me with png at least, my installation doesn't seem to
have a bmp device)

Deepayan

______________________________________________
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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:13 EST