| orb_interactive | R Documentation |
Builds a self-contained HTML document containing the plot as inline SVG plus a small embedded script. The result works offline, needs no JavaScript library, and supports tooltips, hover highlighting, mouse-wheel zoom, dragging to pan, double-click to reset, and clicking legend keys to show or hide series.
orb_interactive(
plot,
file = NULL,
width = 820,
height = 520,
title = "orbis plot"
)
plot |
An |
file |
Optional output path. If |
width, height |
Size in pixels. |
title |
Title of the HTML document. |
If file is given, the path (invisibly); otherwise an
htmltools tag object.
p <- orb(mtcars, x = wt, y = mpg, colour = cyl) + orb_points()
f <- tempfile(fileext = ".html")
orb_interactive(p, file = f)
file.exists(f)
unlink(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.