hb@maths.lth.se
2003-Jul-18 18:32 UTC
[Rd] bringToTop() when some windows been closed (PR#3512)
Full_Name: Henrik Bengtsson Version: R v1.7.1 OS: WinXP Pro Submission from: (NULL) (130.235.2.229) bringToTop() does not work if some windows has been closed. Example: graphics.off() x11() # opens Figure 2 x11() # opens Figure 3 dev.set(2) dev.off() # closes Figure 2 bringToTop(3) # Gives an error # Error in bringToTop(as.integer(which)) : invalid value of `which' x11() # opens Figure 2 again bringToTop(3) # Works fine It seems that *all* preceeding figures k=2,3,..,K-1 have to exist to be able to bringToTop() figure K. Cheers Henrik Bengtsson
Prof Brian Ripley
2003-Jul-18 19:43 UTC
[Rd] bringToTop() when some windows been closed (PR#3512)
We are talking about *devices* here, not windows and not figures. Also, you are on Windows, where the device is called windows(), not x11() (which is just there for back-compatibility). The argument of bringToTop is a `device number'. Unfortunately it tests this against NumDevices(), and that's not right. The test has been corrected in R-devel. As the FAQ says, please do not report guesses at the cause -- your diagnosis is incorrect (and you have only one experimental point) and misled me. On Fri, 18 Jul 2003 hb@maths.lth.se wrote:> Full_Name: Henrik Bengtsson > Version: R v1.7.1 > OS: WinXP Pro > Submission from: (NULL) (130.235.2.229) > > > bringToTop() does not work if some windows has been closed. Example: > > graphics.off() > x11() # opens Figure 2 > x11() # opens Figure 3 > dev.set(2) > dev.off() # closes Figure 2 > bringToTop(3) # Gives an error > # Error in bringToTop(as.integer(which)) : invalid value of `which' > x11() # opens Figure 2 again > bringToTop(3) # Works fine > > It seems that *all* preceeding figures k=2,3,..,K-1 have to exist to be able to > bringToTop() figure K. > > Cheers > > Henrik Bengtsson > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley@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