visnet_save | R Documentation |
Save a visNetwork object as a png.
visnet_save(
url,
file = gsub("\\.html", ".png", url),
res = 8,
delay = 0.2,
zoom = 1,
vwidth = 992 * res,
vheight = 744 * res,
geometry = NULL,
run_shrink = FALSE
)
url |
A vector of URLs to visit. If multiple URLs are provided, it will load and take screenshots of those web pages in parallel. |
file |
A vector of names of output files. Should end with an image file
type ( |
res |
Resolution multiplier. |
delay |
Time to wait before taking screenshot, in seconds. Sometimes a longer delay is needed for all assets to display properly. |
zoom |
A number specifying the zoom factor. A zoom factor of 2 will result in twice as many pixels vertically and horizontally. Note that using 2 is not exactly the same as taking a screenshot on a HiDPI (Retina) device: it is like increasing the zoom to 200 doubling the height and width of the browser window. This differs from using a HiDPI device because some web pages load different, higher-resolution images when they know they will be displayed on a HiDPI device (but using zoom will not report that there is a HiDPI device). |
vwidth |
Viewport width. This is the width of the browser "window". |
vheight |
Viewport height This is the height of the browser "window". |
geometry |
Scaling specification. Can be a percent, as in |
run_shrink |
Run shrink on the png. |
png file path
save_path <- tempfile(fileext = ".html")
res <- dep_graph(pkg = "echoverse",
layout=layout_star,
save_path=save_path)
visnet_save(url = "https://datastorm-open.github.io/visNetwork/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.