[R] creating a ps. file

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Mar 15 15:52:18 CET 2004


Before the loop, open a postscript device with onefile=FALSE, and see the
advice in the postscript help page for how to specify the file argument.  
Then each plot will produce a separate file.  (Remember to do dev.off() 
after the loop.)

On Mon, 15 Mar 2004 mike.campana at freesurf.ch wrote:

> I wrote a routine. At the end of each cycle of the loop I would like to 
> save the result (plot) in a postcriptfile.
> Of course if I just use dev.print in the following way: 
> dev.print(device=postcript, 'c:/Rfigures/plot_1.ps")
> I overwrite my results with the second cycle of the loop. I suppose 
> there is a way to define the file name so that several plots are 
> created(plot_1,plot_2...).
> 
> Could you give me an advice? Thanks a lot
> 
> Best Regards 
> Mike

-- 
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