| orb_svg | R Documentation |
Produces a standalone SVG image of a plot. SVG is a vector format, so the result is resolution independent: it stays sharp at any size or zoom level, which is what makes it suitable both for the web and for print.
orb_svg(plot, width = 820, height = 520, interactive = TRUE, id = NULL)
plot |
An |
width, height |
Size in pixels. |
interactive |
Embed JavaScript for tooltips, hover highlighting, zoom,
pan and legend toggling. Set |
id |
Element id used by the embedded script; generated if |
A character string containing SVG (and, if requested, a wrapping
div with the script).
orb_save(), orb_interactive()
p <- orb(mtcars, x = wt, y = mpg) + orb_points()
s <- orb_svg(p, interactive = FALSE)
substr(s, 1, 40)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.