[Rd] Re: undocumented behaviour of recordPlot (PR#578)

guido@sirio.stat.unipd.it guido@sirio.stat.unipd.it
Fri, 23 Jun 2000 09:10:24 +0200 (MET DST)


On Thu, Jun 22, 2000 at 05:01:32PM +0200, p.dalgaard@biostat.ku.dk wrote:
> I think this is pretty certainly a bug, so I'm cc'ing this to r-bugs.
> 
> 	-p
> 
> Kaspar Pflugshaupt <pflugshaupt@geobot.umnw.ethz.ch> writes:
> > As the documentation states, when I generate a plot and save it with
> > recordPlot, I can regenerate it by printing the variable:
> > 
> > > plot(1:10)
> > > abline(h=5)
> > > abline(v=5)
> > > t.plot<-recordPlot()
> > > t.plot
> > 
> > works perfectly.
> > 
> > Now, if I add further elements to this (regenerated) plot, they get drawn
> > all right (I tested only abline()), which surprised me . But when I re-save
> > the result, only the new additions get saved:
> > 
> > > abline(h=9)     # works (to my surprise)
> > > t.plot2<-recordPlot # saves only the addition, as can be seen by:
> > > str(t.plot2)
> > 
> > OK, so I thought I might regenerate the combined plot by
> > 
> > > t.plot   # worked
> > > t.plot2 # cleared graph, but did nothing
> > 

  The problem is that main/plot.c:do_playDL doesn't set the device 
  diplay list. Inserting towards the beginning a line like
          dd->dipslayList = theList;
  works for me at least under Unix. I will commit it after testing
  under Windows.

  BTW, Kaspar, I have no Windows at hand in this moment but 
  does the problem manifest itself also with the plot history mechanism?
  E.g., (i) if you set (with the menu) the graphics window in 
  'recording mode', (ii) make some plots , (iii) go back to the
  first plot using 'PgUp', (iv) add some new elements to it and 
  (v) go to some other plot and then back to the first plot 
  with 'PgDown' and 'PgUp', the first plot you get is the modified one
  or not? Reason of the question is that replayng of the saved history
  is implemented in a different way.

  guido 





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._