[Rd] pausing between plots - waiting for graphics input

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Nov 30 23:10:58 CET 2004


> >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 at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-devel mailing list