[R] get plot in a window when running R in the shell

Barry Rowlingson B.Rowlingson at lancaster.ac.uk
Mon May 16 16:04:27 CEST 2005

bogdan romocea wrote:

> however I want the plots to appear in a window (as it happens when the
> code is run interactively) instead of being saved in 'Rplots.ps'. Is
> that doable?

  You could explicitly startup an X11 graphics device before your first 
plot in your R source code, something like:


Works for me, although the window will disappear very quickly unless the 
script pauses before ending!


More information about the R-help mailing list