From dmurdoch at pair.com  Mon May 10 21:27:36 2004
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Mon May 10 21:28:29 2004
Subject: [Rd] windows(record=T) loses last plot (PR#3663)
In-Reply-To: <20040508223014.0088AEDE7@slim.kubism.ku.dk>
References: <20040508223014.0088AEDE7@slim.kubism.ku.dk>
Message-ID: <jhlv901sgvnrkiuruu3g4fngf2hf1hkjuf@4ax.com>

On Sun,  9 May 2004 00:30:14 +0200 (CEST), arnima@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


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