[R] how to print a plot

Weiming Zhang Weiming.Zhang at uchsc.edu
Tue Sep 16 17:52:47 CEST 2003


Thank you all very much!

I did forget to use dev.off(). Everything works great now.

Many thanks.

Weiming zhang

On Tue, 2003-09-16 at 00:38, Prof Brian Ripley wrote:
> You did use dev.off() to finish the plots before trying to look at them?
> The symptoms you report are what happens if you did not.
> 
> There is no ps() function in R: the postscript device is postscript() not 
> ps().
> 
> If you want to print a plot, try dev.print.  If you want to copy to a 
> file, try dev.copy2eps.  (You are on Linux, where EPS is more widely 
> acceptable than PDF.)
> 
> On 15 Sep 2003, Weiming Zhang wrote:
> 
> > Hi, Thank both of you.
> > 
> > I tried everything. pdf(file="out.pdf") gave me a damaged pdf file. ps()
> > did not print. ps("out.ps") gave me a ps file with badly drawn graph and
> > could not be printed. I am using RH linux 7.2.
> > 
> > Thanks again.
> > 
> > weiming Zhang
> > 
> > 
> > On Mon, 2003-09-15 at 16:06, Jason Turner wrote:
> > > On Tue, 2003-09-16 at 08:56, Weiming Zhang wrote:
> > > > Hi,
> > > > 
> > > > I am using R-1.7.1 on Linux. I integrated XEMACS with R. Could anybody
> > > > tell me how to print a plot? I used plot function to make some graphs
> > > > and then I wanted to print them or to save them to files. But I could
> > > > not find out how to do it.
> > > 
> > > Have you tried:
> > > help(Devices) 
> > > help(pdf)
> > > 
> > > What I do:
> > > 
> > > pdf(file="myplots.pdf")
> > > plot(...)
> > > dev.off()
> > > 
> > > Use Acrobat or gv to view the pdf files.  Postscript is also good, but
> > > not as universally understood; I have many coleagues who work in very
> > > standard Windows environments, where ghostscript is unknown.  PDF is a
> > > very sensible choice for e-mailing graphs.
> > > 
> > > 
> > > -- 
> > > Indigo Industrial Controls Ltd.
> > > http://www.indigoindustrial.co.nz
> > > +64-(0)21-343-545
> > > 
> > > 
> > > 
> > >
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> > 
> > 
> 
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>




More information about the R-help mailing list