Re: [R] confusion about dev.prev()
> Peter Langfelder > on Mon, 5 Dec 2022 21:40:13 +0800 writes: > Ah, thanks, got it. Misread the help again... ... I think we all had ... and then known for a while and then forgot again ... If you see how to improve the help page, so this happens less, .. we'd look at it to add the improvement there. Martin > Peter > On Mon, Dec 5, 2022 at 9:38 PM Ivan Krylov wrote: >> >> В Mon, 5 Dec 2022 21:28:16 +0800 >> Peter Langfelder пишет: >> >> > Open two devices, plot a plot, call dev.prev() and plot again. I >> > would expect the second plot to appear in the first device, but that >> > is not what happens; both plots appear in the second device. >> >> Unfortunately, dev.prev() and dev.next() only return the number of the >> respective device. You need dev.set() to actually make the change. >> >> -- >> Best regards, >> Ivan > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] confusion about dev.prev()
Ah, thanks, got it. Misread the help again... Peter On Mon, Dec 5, 2022 at 9:38 PM Ivan Krylov wrote: > > В Mon, 5 Dec 2022 21:28:16 +0800 > Peter Langfelder пишет: > > > Open two devices, plot a plot, call dev.prev() and plot again. I > > would expect the second plot to appear in the first device, but that > > is not what happens; both plots appear in the second device. > > Unfortunately, dev.prev() and dev.next() only return the number of the > respective device. You need dev.set() to actually make the change. > > -- > Best regards, > Ivan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] confusion about dev.prev()
В Mon, 5 Dec 2022 21:28:16 +0800 Peter Langfelder пишет: > Open two devices, plot a plot, call dev.prev() and plot again. I > would expect the second plot to appear in the first device, but that > is not what happens; both plots appear in the second device. Unfortunately, dev.prev() and dev.next() only return the number of the respective device. You need dev.set() to actually make the change. -- Best regards, Ivan __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] confusion about dev.prev()
Hi all, I'm either confused about dev.prev() or there's a bug in it. Open two devices, plot a plot, call dev.prev() and plot again. I would expect the second plot to appear in the first device, but that is not what happens; both plots appear in the second device. Is this expected behavior or a bug? Example (in linux): x11() par(mfrow = c(1,2)); x11() par(mfrow = c(1,2)); plot(1:10) dev.prev() plot(10:20) This happens both in R-4.2.0 (patched) and R-devel from 2022-09-13 (sorry, don't have a newer one handy). sessionInfo() from the R-devel session: R Under development (unstable) (2022-09-13 r82849) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Fedora Linux 36 (Thirty Six) Matrix products: default BLAS: /usr/local/lib64/R-devel/lib/libRblas.so LAPACK: /usr/local/lib64/R-devel/lib/libRlapack.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.3.0 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.