[R] Howto Plot With Transparent Background

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Wed Apr 8 15:08:36 CEST 2009


if you not persist in using pdf, the emf format works very well with PPT 
and has a transparent background.
Its the way you copy&paste pdf-graphs form Acrobat to PPT which causes 
the solid (white) background - unfortunately ppt has no builtt in 
support for pdf-graphs.

By default pdfs have a transparent background, see ?pdf and there the bg 
part,
which can be proven by a minimal R+ LaTeX example

#R code
pdf("test.pdf")
plot(1,1)
dev.off()

#minimal tex example
\documentclass[a4paper,12pt]{article}
\usepackage[svgnames]{xcolor}
\usepackage{graphicx}
\begin{document}
\pagecolor{green}
\includegraphics[width=.5\textwidth]{test.pdf}
\end{document}

hth.


Gundala Viswanath schrieb:
> Is there a way to do it in R?
> Especially generating plot in EPS/PDF format.
>
> By transparent I mean clear (not white) background.
> I want to attached it to dark PPT slides.
>
> - Gundala Viswanath
>
> ______________________________________________
> R-help at 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.
>   

-- 
Eik Vettorazzi
Institut für Medizinische Biometrie und Epidemiologie
Universitätsklinikum Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/42803-8243
F ++49/40/42803-7790




More information about the R-help mailing list