Last chance! 50% off unlimited learning
Sale ends in
This function will only work after starting a device with hgd()
.
hgd_svg(page = 0, width = -1, height = -1, which = dev.cur(), file = NA)
Plot page to render. If this is set to 0
, the last page will be selected.
Width of the plot. If this is set to -1
, the last width will be selected.
Height of the plot. If this is set to -1
, the last height will be selected.
Which device (ID).
Filepath to save SVG. (No file will be created if this is NA)
Rendered SVG string.
# NOT RUN {
hgd()
plot(1,1)
s <- hgd_svg(width=600, height=400)
hist(rnorm(100))
hgd_svg(file=tempfile(), width=600, height=400)
dev.off()
# }
Run the code above in your browser using DataLab