devices {withr} | R Documentation |
Graphics devices
Description
Temporarily use a graphics device.
Usage
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())
Arguments
new |
|
code |
|
... |
Additional arguments passed to the graphics device. |
.local_envir |
|
Details
-
with_bmp()
andlocal_bmp()
wrap aroundgrDevices::bmp()
. -
with_cairo_pdf()
andlocal_cairo_pdf()
wrap aroundgrDevices::cairo_pdf()
. -
with_cairo_ps()
andlocal_cairo_ps()
wrap aroundgrDevices::cairo_ps()
. -
with_pdf()
andlocal_pdf()
wrap aroundgrDevices::pdf()
. -
with_postscript()
andlocal_postscript()
wrap aroundgrDevices::postscript()
. -
with_svg()
andlocal_svg()
wrap aroundgrDevices::svg()
. -
with_tiff()
andlocal_tiff()
wrap aroundgrDevices::tiff()
. -
with_xfig()
andlocal_xfig()
wrap aroundgrDevices::xfig()
. -
with_png()
andlocal_png()
wrap aroundgrDevices::png()
. -
with_jpeg()
andlocal_jpeg()
wrap aroundgrDevices::jpeg()
.
Value
[any]
The results of the evaluation of the code
argument.
Functions
-
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
See Also
withr
for examples
Examples
# 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))
)