[R] Printing ps pictures with transparent b'ground

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

From: Peter Dunn (dunn@usq.edu.au)
Date: Thu 06 May 2004 - 14:54:33 EST

Message-id: <4099C509.8020703@usq.edu.au>

Hi all

I wish to create a ps file of a picture produced in R.
With my limited R, I see two ways:
1. Print direct to the postscript device
2. Print to the screen, and save to ps using dev.print.

I want a white (not transparent) background. Option
1 above works fine, but 2 does not: even when I say I
want a white background, I get transparent; perhaps I
misread the help files.

Here's some R code:

### Method 1
### - print straight to postscript device
    file="testfile.eps" )
curve( dnorm, from=-3, to=3)


### Method 2
### - print to screen, and save using postscript

x11(width=4, height=4)
curve( dnorm, from=-3, to=3)

dev.print( postscript,
    file="testfile2.eps" )

I then want to place these files in a LaTeX prosper document
for a presentation. A typical (minimal) prosper file is:



\begin{slide}{Print to \textsc{ps} direct}

\begin{slide}{Print to screen first}


The whitecross class provides a blue background for the
presentation. testfile.eps appears with a white background
on the slides, but testfile2.eps has a transparent

I'd apprecaite if someone could explain why the two are not equivalent,
or how I can coerce the second option to have a white background? Or
even explain my misunderstandings (assuming (with high probability)
that I have some).



> version
platform i686-pc-linux-gnu
arch i686
os linux-gnu
system i686, linux-gnu
major 1
minor 8.1
year 2003
month 11
day 21
language R

Dr Peter Dunn          (USQ CRICOS No. 00244B)
   Web:    http://www.sci.usq.edu.au/staff/dunn
   Email:  dunn @ usq.edu.au
Opinions expressed are mine, not those of USQ.  Obviously...

______________________________________________ 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:07 EST