Plot directly to the appropriate device, e.g. 

pdf(file="my.pdf")
plot(rnorm(500))
dev.off()

This is often recommendable even if you do have an on-screen graphics device 
because some subtleties can get lost in translation for one device to another. 
(The prototypical example is that a legend box is sized to hold the text in the 
font used on the screen device. Then, saving to PDF causes the box to be scaled 
and the font to change, but it can happen that the text now overruns the box 
extents.)

Peter D.

On 24 Apr 2015, at 16:12 , Sudip Chatterjee <sudipanal...@gmail.com> wrote:

> Hi All,
> 
> I am wondering how to save plots in R at CentOS when X11 is not available,
> any suggestion would be appreciated.
> 
> Warm Regards
> Sudip
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to