guido@sirio.stat.unipd.it
2000-Jun-23 07:10 UTC
[Rd] Re: undocumented behaviour of recordPlot (PR#578)
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Kaspar Pflugshaupt
2000-Jun-23 07:42 UTC
[R] Re: [Rd] Re: undocumented behaviour of recordPlot (PR#578)
On 23.6.2000 9:10 Uhr, guido at sirio.stat.unipd.it wrote:> 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.I tried the following:> x11() # and set it to "Recording" manually > plot(1:10) > plot(1:10, 21:30) > plot(10:1, 21:30)All the graphs got recorded, I browsed back to the first and did:> abline(h=5) > abline(h=6)Appeared O.K. Browsed to the end of the recorded graphs & back, lines were still there.> abline(v=7)Added another line to the same plot. Browsed forward & back: all still there. So, no problem here. (I didn't even know you could add to a previously recorded plot. Great!) Cheers Kaspar -- Kaspar Pflugshaupt Geobotanisches Institut Zuerichbergstr. 38 CH-8044 Zuerich Tel. ++41 1 632 43 19 Fax ++41 1 632 12 15 mailto:pflugshaupt at geobot.umnw.ethz.ch privat:pflugshaupt at mails.ch http://www.geobot.umnw.ethz.ch -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._