[R] White background in PS pictures

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Mar 29 08:50:03 CEST 2004


Peter Dunn wrote:
> Hi all
> 
> I am using R to produce postscript pictures via the
> postscript  command.  I have never had any problems...
> until now, when I want to inlcude my .ps file is a
> LaTeX document *without* a white background.  (If
> it's important, I'm using the  prosper  class with
> the  whitecross option, so the background in blue.)
> 
> I would like my .ps file to have a white background.
> If I read the help correctly (?postscript), this is
> achieved using  bg="white", either in the call to
> postscript  or via  ps.options.
> 
> However, whenever I do so, and include my .ps
> file in my LaTeX document, it appears transparent
> (I see the blue background, and the black text on the
> figure is hard to read.)
> 
> I have read the help (at least what I thought was relevant)
> and searched the mail archives but can't find any
> reference to this problem.
> 
> Help appreciated.
> 
> P.

It works for me as follows:

postscript(.....your.settings.....)
par(bg = "white")
plot(.....anything.....)
dev.off()

if it doesn't for you, you might want to try out a more recent version 
of R (R-1.8.1 is recent, the R-1.9.0 beta for people who want to help to 
make R-1.9.0 as stable as possible).


Uwe Ligges

>  > version
>          _
> platform i686-pc-linux-gnu
> arch     i686
> os       linux-gnu
> system   i686, linux-gnu
> status
> major    1
> minor    7.1
> year     2003
> month    06
> day      16
> language R
> 
>




More information about the R-help mailing list