ugd_save {unigd} | R Documentation |
See ugd_render()
for accessing plot data directly in memory without
saving as a file.
This function will only work after starting a device with ugd()
.
ugd_save( file, page = 0, width = -1, height = -1, zoom = 1, as = "auto", which = dev.cur() )
file |
Filepath to save plot. |
page |
Plot page to render. If this is set to |
width |
Width of the plot. If this is set to |
height |
Height of the plot. If this is set to |
zoom |
Zoom level. (For example: |
as |
Renderer. When set to |
which |
Which device (ID). |
No return value. Plot will be saved to file.
ugd() plot(1, 1) tf <- tempfile() on.exit(unlink(tf)) ugd_save(file = tf, width = 600, height = 400, as = "png") dev.off()