Learn R Programming

unigd (version 0.2.0)

ugd_render: Render unigd plot and return it.

Description

See ugd_save() for saving rendered plots as files. This function will only work after starting a device with ugd().

Usage

ugd_render(
  page = 0,
  width = -1,
  height = -1,
  zoom = 1,
  as = "svg",
  which = dev.cur()
)

Value

Rendered plot. Text renderers return strings, binary renderers return byte arrays.

Arguments

page

Plot page to render. If this is set to 0, the last page will be selected. Can be set to a numeric plot index or plot ID (see ugd_id()).

width

Width of the plot. If this is set to -1, the last width will be selected.

height

Height of the plot. If this is set to -1, the last height will be selected.

zoom

Zoom level. (For example: 2 corresponds to 200%, 0.5 would be 50%.)

as

Renderer.

which

Which device (ID).

Examples

Run this code
ugd()
plot(1, 1)
ugd_render(width = 600, height = 400, as = "svg")
dev.off()

Run the code above in your browser using DataLab