Skip to content

Howto Plot With Transparent Background

4 messages · Gundala Viswanath, Baptiste Auguie, Eik Vettorazzi +1 more

#
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
#
with base graphics,

par(bg=NA)

see ?par


Hope this helps,

baptiste
On 8 Apr 2009, at 12:54, Gundala Viswanath wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
#
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:

  
    
#
Eik Vettorazzi wrote, On 08.04.2009 15:08:
I really like those bizarre green pages. Thanks for sharing.
:-)

Christof