extendrSVGdevice
A Rust-implementation of devout’s tutorial to create an SVG graphic device using extendr.
library(extendrSVGdevice)
library(ggplot2)
file <- knitr::fig_path('.svg')
extendr_svg(file, 10, 10)
set.seed(10)
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
ggplot(dsamp, aes(carat, price)) +
geom_point(aes(colour = clarity))
dev.off()
#> png
#> 2
knitr::include_graphics(file)