[R] "Transparent" background in graphics exported as metafiles

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Aug 8 09:57:55 CEST 2001


On Wed, 8 Aug 2001, Philippe Grosjean wrote:

> Hi,
>
> Under Windows, I am exporting graphs from R (in metafile -emf- format), and
> want to combine them using a graphic package. It happens that the background
> of the graph is represented by a filled rectangle (with the color given by
> bg=...). This is to be expected. However, I find no options to disable this
> and produce a graph with transparent background. Does such an option exist?

No. Actually, I think you want no background in the EMF file, as I don't
know want `transparent background' means in EMF (but that could be my
ignorance).

`transparent' is not an R colour.  I guess ideally bg="transparent" would
suppress colouring the background on all devices.

> If not, then this could be a useful addition, because it is tricky to edit
> the metafile, ungroup de elements, select the background rectangle, delete
> it, regroup all the other elements and save the graph in a graphic pachage
> just to get transparent background on the graph... This could be simply
> bg=False.

Patches accepted....  It has been mentioned before in the context of png
and jpeg plots.


> Thanks,
>
> Philippe Grosjean
>
> P.S.: I really appreciate the changes made to exported graphs in R to
> correct the bug in MS Word 2000 (some metafiles are not correctly displayed
> on screen in Word 2000 for Windows). It is amazing that the R-team find a
> workaround for this Micro$oft bug... and in the meanwhile, Micro$oft itself
> does nothing. This is another example of the poor service of MS, comparing
> to a community of volunteers creating a GPL software!!! Many, many thanks to
> all guys that contributed to fix this.

The one accepts your thanks.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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