[R] x11 window queston

Luke Spadavecchia l.spadavecchia at googlemail.com
Mon Oct 29 11:58:19 CET 2007


Hi all,

Sorry for reposting, but I think my last request was a little confusing.

I am trying to keep my x windows open after I exit the R session, so  
when I have produced a series of plots from R I would like to retain  
the graphics as x windows after exiting with q(). This would be  
particularly useful for batch mode execution of R scripts; at the  
moment when I run scripts with R CMD BATCH myscript.R my graphics  
flash up in the x window momentarily, but disappear as R exits  
(providing x11 is running and I use Sys.setenv("DISPLAY"=":0.0")  
before opening x with x11()). Is it possible to retain these (as it  
is in GNUPLOT using the persist option), both in interactive and  
batch mode? I am able to keep the plot open for examination by adding  
a long serial loop to the end of the script, but this is not a  
particularly good solution.

I am able to save the contents of the x windows as pdf, bmp etc with  
dev.print(), but I would rather retain the graphics in an open x  
window, so I could keep the plots on screen after a system call to R  
from other programs.

Many thanks

Luke Spadavecchia

PS. I am running R-2.4.1 on Mac OS X (intel processor), and Windows  
XP with the same results on both systems



More information about the R-help mailing list