[R] Plotting directly to memory?
jeroenoom@ @end|ng |rom gm@||@com
Sun May 28 15:24:49 CEST 2023
On Sun, May 28, 2023 at 1:46 PM Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> Is there a way to open a graphics device that plots entirely to an array
> or raster in memory? I'd prefer it to use base graphics, but grid would
> be fine if it makes a difference.
> For an explicit example, I'd like to do the equivalent of this:
> filename <- tempfile(fileext = ".png")
> plot(1:10, 1:10)
> img <- readPNG(filename)
The magick package has this capability too:
img <- magick::image_device()
More information about the R-help