Description Usage Arguments Value Examples
Run some code, capturing an image.
1 2 | capture_plot(name, code, path = get_diff_dir(), dev = "png", width = 250,
height = 250, ...)
|
name |
unique name for plot. Should not include extension |
code |
to evaluate and print. Printing ensure that
|
path |
where to save resulting image, defaults to
|
dev |
name of graphics device to use, defaults to
|
width,height |
dimenion, in pixels, of resulting plot |
... |
other arguments passed on to the graphics device. |
(invisibly) the path of the created file
1 2 | capture_plot("Sequence", plot(1:10))
capture_plot("Random", plot(runif(10)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.