Skip to content

RecordPlot

1 message · Paul Murrell

#
Hi

The main problem here is that you really shouldn't be poking around 
inside a "recordedplot" object.  From the help page:

WARNING:

      The format of recorded plots may change between R versions.
      Recorded plots should *not* be used as a permanent storage format
      for R plots.

      R will always attempt to replay a recorded plot, but if the plot
      was  recorded with a different R version then bad things may
      happen.

This could (should) be more explicit.  In particular, it might be worth 
adding a comment from the C source ...

  * The graphics engine assumes that it is getting a snapshot
  * that was created in THE CURRENT R SESSION

... [snapshot == recordedplot].  The basic message is:  don't rely on 
the internal structure of a recordedplot because we can (and have [and 
will]) change it at any time.

That leaves the problem of how to achieve your "zoom", but I'm not sure 
exactly what your zoom is doing (just modifying the axis ranges?). 
Could you (privately) send me screen shots of before and after the zoom? 
Then I can try to suggest a "correct" way to zoom.

Paul
Jean Coursol wrote: