Michael Sumner
2012-Mar-15 06:29 UTC
[Rd] windows() device: plot does not refresh with new drawing after opening and closing a new device
Hello, I see this problem in 2.14.1, a recent dev, and 2.15.0 alpha, but not in an older build. Start the R windows console and run this code: plot(1:10);windows();dev.off();points(10:1) The second set of points does not show up until the window is minimized and restored. If the device is replaced with a file-based one (pdf, png) there's no problem. I see this behaviour on these versions: R version 2.15.0 alpha (2012-03-13 r58726) Platform: x86_64-pc-mingw32/x64 (64-bit) R Under development (unstable) (2012-02-28 r58513) Platform: x86_64-pc-mingw32/x64 (64-bit) R version 2.14.1 (2011-12-22) Platform: x86_64-pc-mingw32/x64 (64-bit) I have an old beta install of 2.13.2 where the problem does not occur: R version 2.13.2 beta (2011-09-22 r57035) Platform: x86_64-pc-mingw32/x64 (64-bit) Cheers, Mike. -- Michael Sumner Institute for Marine and Antarctic Studies, University of Tasmania Hobart, Australia e-mail: mdsumner at gmail.com
Duncan Murdoch
2012-Mar-15 10:54 UTC
[Rd] windows() device: plot does not refresh with new drawing after opening and closing a new device
On 12-03-15 2:29 AM, Michael Sumner wrote:> Hello, > > I see this problem in 2.14.1, a recent dev, and 2.15.0 alpha, but not > in an older build. > > Start the R windows console and run this code: > > plot(1:10);windows();dev.off();points(10:1) > > The second set of points does not show up until the window is > minimized and restored.Definitely looks like a bug. I'll see if I can track it down. Duncan Murdoch> > If the device is replaced with a file-based one (pdf, png) there's no problem. > > I see this behaviour on these versions: > > R version 2.15.0 alpha (2012-03-13 r58726) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > R Under development (unstable) (2012-02-28 r58513) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > R version 2.14.1 (2011-12-22) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > I have an old beta install of 2.13.2 where the problem does not occur: > > R version 2.13.2 beta (2011-09-22 r57035) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > Cheers, Mike. > >
Duncan Murdoch
2012-Mar-15 18:34 UTC
[Rd] windows() device: plot does not refresh with new drawing after opening and closing a new device
On 15/03/2012 2:29 AM, Michael Sumner wrote:> Hello, > > I see this problem in 2.14.1, a recent dev, and 2.15.0 alpha, but not > in an older build. > > Start the R windows console and run this code: > > plot(1:10);windows();dev.off();points(10:1) > > The second set of points does not show up until the window is > minimized and restored. > > If the device is replaced with a file-based one (pdf, png) there's no problem.The problem is caused by events happening asynchronously: the first device is made active before the second one is closed, and closing the second one cancels the pending updates. We should be able to get it fixed before 2.15.0; in the meantime, a workaround is to call dev.flush(), e.g. plot(1:10);windows();dev.off();points(10:1);dev.flush() should be fine. Duncan Murdoch> I see this behaviour on these versions: > > R version 2.15.0 alpha (2012-03-13 r58726) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > R Under development (unstable) (2012-02-28 r58513) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > R version 2.14.1 (2011-12-22) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > I have an old beta install of 2.13.2 where the problem does not occur: > > R version 2.13.2 beta (2011-09-22 r57035) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > Cheers, Mike. > >