Skip to content

windows(record=T) loses last plot (PR#3663)

3 messages · Arni Magnusson, Duncan Murdoch, Brian Ripley

#
The audit trail indicates that PR#3663 is not reproducible and/or fixed,
but I believe windows(record=T) is still not working as documented:

 windows(record=T)
 for(i in 1:5) plot(0, 0, cex=4, pch=as.character(i))

After cycling through the plots with PgUp and PgDn, the user finds out
that plot 5 is lost. Indeed,

 .SavedPlots

reports that only 4 plots were saved. I'm running the example in a fresh R
session, after rm(list=ls(all=T)), quitting, and restarting. I have
reproduced this bug on two machines, one with a fresh R installation.

Thanks,
Arni

OS:       Windows XP
R:        1.9.0
graphics: 1.9.0
1 day later
#
On Sun,  9 May 2004 00:30:14 +0200 (CEST), arnima@u.washington.edu
wrote :
I vaguely recall that the issue was that history saving doesn't happen
until drawing to the graph is done.  Since that never happened for the
last one, it doesn't get saved.

A way to fix this would be to implicitly save the graph when
responding to a request to look at a different page.  Another would be
to save a graph as soon as it is created; graphs on the history list
can be modified, and the modifications stick.

Any chance you could track down what patch is necessary?  I'm not
likely to get to it in the next few weeks, and it would be nice to
have this fixed in 1.9.1.

Duncan Murdoch
#
The claim in the original report is that it loses the 5,9th etc plot if it 
is the last, but not otherwise.  At one time the example in the report 
worked (but that was a long time ago and there have been extensive 
changes since then.).

The problem was that growing the list changed vDL, and Guido's macros hid 
that.  A simple fix once found ....
On Mon, 10 May 2004, Duncan Murdoch wrote:

            
That was originally true, but was changed.