devices | R Documentation |
Temporarily use a graphics device.
with_bmp(new, code, ...)
local_bmp(new, ..., .local_envir = parent.frame())
with_cairo_pdf(new, code, ...)
local_cairo_pdf(new, ..., .local_envir = parent.frame())
with_cairo_ps(new, code, ...)
local_cairo_ps(new, ..., .local_envir = parent.frame())
with_pdf(new, code, ...)
local_pdf(new, ..., .local_envir = parent.frame())
with_postscript(new, code, ...)
local_postscript(new, ..., .local_envir = parent.frame())
with_svg(new, code, ...)
local_svg(new, ..., .local_envir = parent.frame())
with_tiff(new, code, ...)
local_tiff(new, ..., .local_envir = parent.frame())
with_xfig(new, code, ...)
local_xfig(new, ..., .local_envir = parent.frame())
with_png(new, code, ...)
local_png(new, ..., .local_envir = parent.frame())
with_jpeg(new, code, ...)
local_jpeg(new, ..., .local_envir = parent.frame())
new |
|
code |
|
... |
Additional arguments passed to the graphics device. |
.local_envir |
|
with_bmp()
and local_bmp()
wrap around grDevices::bmp()
.
with_cairo_pdf()
and local_cairo_pdf()
wrap around grDevices::cairo_pdf()
.
with_cairo_ps()
and local_cairo_ps()
wrap around grDevices::cairo_ps()
.
with_pdf()
and local_pdf()
wrap around grDevices::pdf()
.
with_postscript()
and local_postscript()
wrap around grDevices::postscript()
.
with_svg()
and local_svg()
wrap around grDevices::svg()
.
with_tiff()
and local_tiff()
wrap around grDevices::tiff()
.
with_xfig()
and local_xfig()
wrap around grDevices::xfig()
.
with_png()
and local_png()
wrap around grDevices::png()
.
with_jpeg()
and local_jpeg()
wrap around grDevices::jpeg()
.
[any]
The results of the evaluation of the code
argument.
with_bmp()
: BMP device
with_cairo_pdf()
: CAIRO_PDF device
with_cairo_ps()
: CAIRO_PS device
with_pdf()
: PDF device
with_postscript()
: POSTSCRIPT device
with_svg()
: SVG device
with_tiff()
: TIFF device
with_xfig()
: XFIG device
with_png()
: PNG device
with_jpeg()
: JPEG device
withr
for examples
Devices
# dimensions are in inches
with_pdf(file.path(tempdir(), "test.pdf"), width = 7, height = 5,
plot(runif(5))
)
# dimensions are in pixels
with_png(file.path(tempdir(), "test.png"), width = 800, height = 600,
plot(runif(5))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.