| snapshot_brain | R Documentation |
Takes a screenshot of a ggseg3d widget and saves it as a PNG image. Requires a Chrome-based browser to be installed.
snapshot_brain(p, file, width = 600, height = 500, delay = 1, zoom = 2, ...)
p |
ggseg3d widget object |
file |
string. Output file path (should end in .png) |
width |
numeric. Image width in pixels (default: 600) |
height |
numeric. Image height in pixels (default: 500) |
delay |
numeric. Seconds to wait for widget to render before capture (default: 1) |
zoom |
numeric. Zoom factor for higher resolution (default: 2) |
... |
Additional arguments passed to webshot2::webshot |
The file path (invisibly)
## Not run:
ggseg3d() |>
pan_camera("left lateral") |>
snapshot_brain("brain.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.