ugd_save_inline {unigd} | R Documentation |
Inline plot rendering to a file.
Description
Convenience function for quick inline plot rendering.
This is similar to ugd_save()
but the plotting code
is specified inline and an unigd graphics device is managed
(created and closed) automatically. Starting a device with ugd()
is
therefore not necessary.
Usage
ugd_save_inline(
code,
file,
page = 0,
width = getOption("unigd.width", 720),
height = getOption("unigd.height", 576),
zoom = 1,
as = "auto",
...
)
Arguments
code |
Plotting code. See examples for more information. |
file |
Filepath to save plot. |
page |
Plot page to render. If this is set to |
width |
Width of the plot. |
height |
Height of the plot. |
zoom |
Zoom level. (For example: |
as |
Renderer. |
... |
Additional parameters passed to |
Value
No return value. Plot will be saved to file.
Examples
tf <- tempfile(fileext=".svg")
on.exit(unlink(tf))
ugd_save_inline({
plot.new()
lines(c(0.5, 1, 0.5), c(0.5, 1, 1))
}, file = tf)
[Package unigd version 0.1.2 Index]