[R] probleme with savePlot (to eps)

Christophe Genolini cgenolin at u-paris10.fr
Mon Mar 2 10:45:18 CET 2009

I am using windows XP pack3 and R 2.8.1 so I guess this is savePlot for 
As Gabor say, savePlot offer to export graph also in eps.
> If you want to copy a screen device to postscript portably, use 
> dev.copy2eps().
I am exporting graph in a package, so I don't want to copy screen device 
to postscript, I want to copy screen device to postscript OR to any 
other type that the user may want...
It is why I can not use a specific function (postscrip(), dev.copy2eps() 
) but I need a generic one.

> On Sun, 1 Mar 2009, David Winsemius wrote:
>> Unfortunately your burning desire to use savePlot for this purpose is 
>> not going to reconfigure the capabilities of that function. Just read 
>> the help page of savePlot:
>> savePlot {grDevices}
>> R Documentation
>> Save Cairo X11 Plot to FileDescription
>> Save the current page of a cairo X11() device to a file.
>> Usage
>> savePlot(filename = paste("Rplot", type, sep="."), type = c("png", 
>> "jpeg", "tiff", "bmp"), device = dev.cur())
>> ====
>> Do you see "ps" or "eps" in the supported types? I do not. Why would 
>> you expect be a warning not to use a type of device that was not 
>> documented as possible.
>> Have you looked at dev.copy or dev.print as a method of getting the 
>> user choice of screen displayed graphics to an output file?
>> -- 
>> David Winsemius
>> On Mar 1, 2009, at 6:02 PM, Christophe Genolini wrote:
>>> Thanks for your answer.
>>>> Use the postscript device to save .ps or .eps files.
>>> Unfortunatly, I can't. I am using savePlot in a package. Several 
>>> graphs (up to 100) are exported at the same time and I would like 
>>> the user to chose the extension. It is why I need savePlot.
>>> Beside, I did not find any warning again postscript in the help page 
>>> for savePlot. Where did you get this information ? I am using R 2.8.1
>>> Christophe
>>>> The help page for savePlot does not suggest that it would be of any 
>>>> value in saving plots as postscript files.
>>>> ?postscript
>>>> ?Devices
>> ______________________________________________
>> 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.

More information about the R-help mailing list