search for: replayplot

Displaying 20 results from an estimated 53 matches for "replayplot".

2018 Apr 02
3
recordPlot/replayPlot not working with saveRDS/readRDS
...st and have it work within the same R session, using R 3.4.3 or 3.3.3. Here's an example: # Save displaylist for a simple plot png('test.png') dev.control(displaylist ="enable") plot(1:5, 1:5) r <- recordPlot() dev.off() # Replay plot. This works. png('test1.png') replayPlot(r) dev.off() # Save the plot and load it, then try to replay it. This does not work. saveRDS(r, 'recordedplot.rds') r2 <- readRDS('recordedplot.rds') png('test2.png') replayPlot(r2) ## Error: NULL value passed as symbol address dev.off() Is there something that I'...
2018 Apr 03
1
[FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
...ated in. The > saveRDS()/readRDS() works if you save in one R session and > then read in a different R session. The assumption is > that if you are still in the same session that created the > recordedplot you still have the recordedplot (e.g., you > can just do replayPlot(r) instead of replayPlot(r2). Is > that a bad assumption ? Not "bad", really, but somewhat *un*intuitive I believe to most users, including me. I would have done the same as Winston to check if saving and loading of a recorded plot work fine. Also, the error message we get is n...
2002 Nov 01
1
recordPlot in 1.5.x, replayPlot in 1.6.0 problem
I have plots that were stored using recordPlot() in a fairly recent but pre-1.6.0 version of R that will not replayPlot() in R 1.6.0. The error message is Error in replayPlot(x) : invalid hex digit in color or lty The plots were stored in June (2002-6-14), each as an element of a list named 'rpl'. The version of R that was current then is what I used. At that time I was able to re-display them. Tod...
2017 May 15
1
Error messages in replayPlot()
...sults in a helpful error message: png(height = 100) plot(1) # Error in plot.new() : figure margins too large dev.off() However when this happens when replaying a recorded plot, the error message is not so helpful. myplot <- evaluate::evaluate("plot(1)")[[2]] png(height = 100) replayPlot(myplot) # Error in replayPlot(x) : invalid graphics state dev.off() A more informative error message that hints at what exactly is invalid about the graphics state would be very helpful in this case.
2018 Apr 02
0
[FORGED] recordPlot/replayPlot not working with saveRDS/readRDS
...ot into the same session that it was created in. The saveRDS()/readRDS() works if you save in one R session and then read in a different R session. The assumption is that if you are still in the same session that created the recordedplot you still have the recordedplot (e.g., you can just do replayPlot(r) instead of replayPlot(r2). Is that a bad assumption ? Paul On 03/04/18 05:23, Winston Chang wrote: > The documentation for recordPlot says the following: > >> As of R 3.3.0, it is possible (again) to replay a plot from another R session using, for example, saveRDS and readRDS. &g...
2005 Sep 18
1
replayPlot in loop
Hi, In order to make a movie-like animation of different graphs with replayPlot inside a fast loop: is there a way to avoid the appearance of some white stripes/streaks between the different calls to replayPlot? thanks in advance Johan VH
2013 Sep 13
1
inconsistency/bug in recordPlot/replayPlot
Hey all, I've run accross what seems to be a bug in the recordPlot/replayPlot functionality (or at least the lack of a feature which seems pretty reasonable to expect to be there) When drawing to a file-based graphics device (I tested with png()), the file resulting from calling replayPlot on a recordedplot object does not contain an identical image to that captured by the...
2017 Feb 20
2
[FORGED] Re: Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R
Hi This appears to be happening (at least) because cairo_pdf() delays initialising a Cairo surface until BM_NewPage(), rather than initiliasing a Cairo surface in BM_Open(), and replayPlot() triggers some activity (set clip region) on the device BEFORE a new page is started (so the pointer to the Cairo surface is null, so BOOM). Not sure yet whether to blame replayPlot() for not starting with a new page operation OR to blame cairo_pdf() for not initialising a Cairo surface at de...
2013 Sep 24
1
recordPlot() on non-interactive graphics device?
...device, or only for _interactive_ ones? For instance, windows(); plot(1:10); g <- recordPlot(); dev.off(); x11(); plot(1:10); g <- recordPlot(); dev.off(); Cairo::CairoWin(); plot(1:10); g <- recordPlot(); dev.off(); all produce 'recordplot' objects that replot the figure with replayPlot(g), whereas for instance png("foo.png"); plot(1:10); g <- recordPlot(); dev.off(); pdf("foo.pdf"); plot(1:10); g <- recordPlot(); dev.off(); produce "empty" replayPlot(g) outputs. Q. It it just a coincident that it appear that recordPlot()/replayPlot() only wo...
2017 Feb 20
3
Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R
Hi, I wonder if this is expected or I'm doing a wrong thing. pdf() dev.control('enable') library("grid") plot(1) grid.text("A") res = recordPlot() dev.off() cairo_pdf() replayPlot(res) dev.off() *** caught segfault *** address 0x4, cause 'memory not mapped' > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierra 10.12.3 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 att...
2008 Apr 21
1
Use of recordPlot
...r (mfg=c(1,1)); plot( ...some stuff...); par (mfg=c(1,2); plot(....some more stuff...) par (mfg=c(2,1); plot(....some more stuff...) par (mfg=c(2,2); plot(....some more stuff...) plot_save=recordPlot(); # now some more code, doing other stuff, maybe more plots # now try to replay the saved plot: replayPlot(plot_save) This last line gives the following error: Error in replayPlot(plot_save) : A clipboard metafile can store only one figure. The documentation says that replayPlot() has a print method, so let's try that: we get the following error: Error: unexpected symbol in "replayPlot(lm_...
2014 May 01
2
Request to Replace Recordplot ,, replayplot
Record plot which stores a plot to an internal R data structure and Replay Plot which replays the plot enables one to keep plots around and use them accross sessions at least until version 3. If you cannot restore old plots and treat them as data and save accross sessions, there is little reason for recordPlot. Either R needs to dispense with internal formats entirelly, a bad move in my opinion
2014 Apr 30
0
ReplayPlot, limited to single session for RecordPlot()
R had an internal Plot format which could be saved in files and then reused. Just like one can save data.frames or lists of data which I routinely do could save plot which could be used for further elaboration and analysis. Thus you could modify a plot after you saved it. Matlab has a fig format which it uses for that purpose. The current version of R version 3 allows plots only to be used
2017 Feb 21
0
[FORGED] Re: Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R
...r of cairo_pdf() that I have not broken anything. Paul On 21/02/17 08:27, Paul Murrell wrote: > Hi > > This appears to be happening (at least) because cairo_pdf() delays > initialising a Cairo surface until BM_NewPage(), rather than > initiliasing a Cairo surface in BM_Open(), and replayPlot() triggers > some activity (set clip region) on the device BEFORE a new page is > started (so the pointer to the Cairo surface is null, so BOOM). > > Not sure yet whether to blame replayPlot() for not starting with a new > page operation OR to blame cairo_pdf() for not initialising a...
2023 Oct 15
2
Plot to a device and examine the plot?
...examine it there. It won't be pixel-by-pixel identical, but will contain the same components, likely with slightly different scaling and positioning if the new device isn't the same as the old one. You can also save the commands that drew the plot using recordPlot() and redraw it using replayPlot() (which is essentially what dev.copy() does), but the format of the object saved by recordPlot() is not documented, and is subject to change with R version changes. Duncan Murdoch
2008 Apr 21
5
Documentation General Comments
...ould help a lot, e.g. the difference between lists, arrays, matrices and frames. And, it appears there is some object-orientation to R, but it is not complete. I can't, for instance find a "metafile" method for a "recordedplot" type, using either the variable direclty or the replayPlot() method. I am sorry to post this, but I am really having trouble sorting out certain methods in "R". The basic tutorial "Introduction to R" is so basic, it hardly helps at all, then digging through documentation is really an exercise in frustration. The SimpleR is also so basic...
2015 Sep 26
1
grDevice in R HEAD been broken for 6 weeks.
...h --enable-strict-barrier , bisected to: ------------------------------------------------------------------------ r69049 | murrell | 2015-08-14 00:03:12 +0100 (Fri, 14 Aug 2015) | 2 lines first hack at adding grid display list to recorded plot objects, so can add further grid drawing following a replayPlot() ------------------------------------------------------------------------ It seems to be broken by the GE_SaveSnapshotState addition in src/library/grid/src/state.c: case GE_SaveSnapshotState: + /* + * Save the current 'grid' DL. + */ + PROTECT(result...
2001 Jun 20
0
recordPlot usage: add snaps to a list.
...] "gpar" "displaylist" "gpar" "displaylist" "gpar" [11] "displaylist" "gpar" "displaylist" "gpar" "displaylist" but i can''t see how to access the snapshots from replayPlot(). Adding the images into the list flattens them and makes the class of the items no longer equal "recordedplot". > replayPlot(pictureList[[1]]) Error in if (class(x) != "recordedplot") stop("argument is not of class \"recordedplot\"") : missing...
2010 Feb 23
1
How to change a venn command into a named object that can be plotted like a lattice object
Hello, I am plotting data as a venn diagram but would like to be able to control how it is plotted like a lattice object. Right now, it plots right away. I would like to name it and then plot at will. I thought to convert the whole thing to a PostScript file then get it back into R via grImport, but surely (please!) there must be a less roundabout way to do this. Any help is appreciated. Here
2010 Sep 07
1
what is the best way for an external interface to interact with graphics, libraries
...when working remotely through ssh without forwarding X11). In both cases the user has to invoke a command, v(), in order to insert the current graph into the buffer at the current place. With X11, the way it works is that when v() is invoked I call recordPlot(), then open a postscript file, then replayPlot(), and then close the postscript file and insert it into the session. Without X11, I open a postscript file ahead of time, then when v() is called, I close it, and insert it into the session, and then open a new postscript file. Obviously quite primitive.I think ideally would be if everything was...