| orb_save | R Documentation |
Writes a plot to disk. The format is taken from the file extension:
orb_save(plot, file, width = 820, height = 520, dpi = 300, interactive = TRUE)
plot |
An |
file |
Output path. The extension selects the format. |
width, height |
Logical size in pixels (the drawing is laid out at this
size, then rendered at |
dpi |
Resolution for raster formats. 96 is screen resolution; 300 is a common print requirement; 600 gives very high resolution output. |
interactive |
For |
.svgVector output from the built-in SVG writer. Being a vector format it is resolution independent - it stays sharp at any size.
.htmlA self-contained interactive page (see orb_interactive()).
.pdfVector output through R's PDF device.
.png, .tiff, .jpegRaster output at the requested dpi; use
300 or more for print.
The file path, invisibly.
orb_svg(), orb_interactive(), orb_draw()
p <- orb(mtcars, x = wt, y = mpg, colour = cyl) + orb_points()
f <- tempfile(fileext = ".png")
orb_save(p, f, dpi = 300)
file.exists(f)
unlink(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.