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

Duncan Murdoch dmurdoch at pair.com
Mon May 10 21:27:36 CEST 2004


On Sun,  9 May 2004 00:30:14 +0200 (CEST), arnima at u.washington.edu
wrote :

>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.

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



More information about the R-devel mailing list