Re: [R] displaying intensity through opacity on an image (ONE SOLUTION)

From: jiho <>
Date: Sat, 19 May 2007 20:32:27 +0200

On 2007-May-19 , at 15:08 , Ranjan Maitra wrote:
> On Sat, 19 May 2007 22:05:36 +1000 Jim Lemon <>
> wrote:
>> Ranjan Maitra wrote:
>>> ...
>>> (we are out of R).
>>> And then look at the pdf file created: by default it is Rplots.pdf.
>>> OK, now we can use gimp, simply to convert this to .eps.
>>> Alternatively on linux, the command pdftops and then psto epsi on
>>> it would also work.
>>> Yippee! Isn't R wonderful??
>> Sure is. You could probably save one step by using postscript()
>> instead
>> of pdf() and get an eps file directly. The reason I didn't answer the
>> first time is I couldn't quite figure out how to do what you wanted.
> Thanks, Jim! Not a problem, But will postscript() work? I thought
> that help file said that only pdf and MacOSX quartz would work (at
> the time it was written).
> It certainly does not work for me on the screen.
> Btw, I made an error in writing the previous e-mail: the command to
> convert to .eps from .ps is ps2epsi.

I haven't followed the discussion from the beginning but, independently of R, some image formats support transparency while others don't. PDF supports transparency but EPS and PS don't. So you can't expect R's postscript() device to support it (and you will loose it when converting a pdf to and eps or a ps file). SVG support transparency beautifully and you'll be able to edit it with Inkscape (which is cross platform). R can produce SVG thrhough the package RSvgDevice.
Furthermore, if you open a PDF (or any vector based format such as EPS or PS) with Gimp it will "rasterize" it: convert the vector information to pixels. You'll be able to save it to many formats but it will still be pixel based (zooming on it will reveal pixels while it's not true with vector based formats).

Hope that helps.



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 19 May 2007 - 18:39:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 May 2007 - 20:34:40 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.