grid.cap | R Documentation |
Capture the current contents of a graphics device as a raster (bitmap) image.
grid.cap()
This function is only implemented for on-screen graphics devices.
A matrix of R colour names, or NULL
if not available.
Paul Murrell
grid.raster
dev.capabilities
to see if it is supported.
dev.new(width=0.5, height=0.5) grid.rect() grid.text("hi") cap <- grid.cap() dev.off() if(!is.null(cap)) grid.raster(cap, width=0.5, height=0.5, interpolate=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.