From p.dalgaard at biostat.ku.dk  Tue Nov 30 23:10:58 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Tue Nov 30 23:13:39 2004
Subject: [Rd] pausing between plots - waiting for graphics input
In-Reply-To: <m0opq0l8p61kfvi5kosj1gt4438ofls8um@4ax.com>
References: <b68812e704112708422b5228a4@mail.gmail.com>
	<1101582479.13352.37.camel@horizons.localdomain>
	<b68812e704112718032d3cf7d8@mail.gmail.com>
	<vuhiq095lke0trblge8161b3dakaubg776@4ax.com>
	<2kpjq0p9bq1i8b2258rl71bds4k9bg83fq@4ax.com>
	<Pine.A41.4.61b.0411290912110.88302@homer09.u.washington.edu>
	<16812.22791.971545.79304@gargle.gargle.HOWL>
	<jrnoq05l7bk577i9agfjctgh8k2jq8ls7m@4ax.com>
	<41ACD02F.4000105@stat.auckland.ac.nz> <x2653n2hi0.fsf@biostat.ku.dk>
	<m0opq0l8p61kfvi5kosj1gt4438ofls8um@4ax.com>
Message-ID: <x2wtw30yz1.fsf@biostat.ku.dk>


> >Sure, but the general structure probably needs a bit of attention.
> >There could be different preferred methods for different devices,
> >possibly with the current method as a fallback.
> 
> Current method?  Do you just mean the par(ask = TRUE) behaviour, or is
> there something more already there?

No that was it. (Just speculating diffusely: We might find ourselves
with a graphics gadget - say, an SVG viewer - which can't do any
interactive stuff but still needs to be pausable.)
 
> >> A much nicer solution of course would be asynchronous event handling
> >> in the graphics window (i.e., you don't block the command line), but
> >> that depends on the event loop integration problem being solved and
> >> that does not look like happening soon.
> >
> >Not sure we really want that actually. What if someone issues a plot
> >command from the command line? 
> 
> There are definitely lots of issues.  In Windows it would be sensible
> for most event handling to be shut down during function evaluation
> unless specifically reactivated (but not all; low level stuff like
> redraws still need to be done).  But I understood from discussions
> last year that X uses a very different event model, so this wouldn't
> make sense.

Not necessarily the relevant distinction here. I was thinking more of
the intrinsic logic of the matter: If you were in the middle of
viewing demo(graphics), and did plot(rnorm(100)) on the command line,
where would the plot go? How would you resume the demo afterwards?

(Interactive SAS, by the way, separates the viewer from the plotting
so that you'd plot the entire demo and _then_ view it one frame at a
time. Subsequent plots are just added onto the end of the graph list
- causing no end of confusion to students when they haven't realized
that the viewer wasn't positioned at the end and they can't understand
why their plot commands don't seem to have any effect...)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] pausing between plots - waiting for graphics input
Peter Dalgaard