View source: R/save_phylopic.R
save_phylopic | R Documentation |
save_phylopic
is a convenient function for saving a PhyloPic silhouette
fetched via get_phylopic
. Available formats for
saving are those available in the grDevices package (i.e. pdf, png, svg,
tiff, jpeg, and bmp).
save_phylopic(img = NULL, path = NULL, bg = "transparent", ...)
img |
|
path |
|
bg |
|
... |
Additional arguments available for the called grDevices
function. The called function is determined by the file extension used in
|
This function can be used to save a PhyloPic image obtained via
the get_phylopic
or any object of class
Picture
from the grImport2 package. Any file format available in the
grDevices package can be used (i.e. pdf, png, svg, tiff, jpeg, and
bmp).
An image is saved. Nothing is returned to the R interface.
## Not run:
# Get image data
img <- get_phylopic("27356f15-3cf8-47e8-ab41-71c6260b2724")
# Save file
save_phylopic(img = img, path = "./phylopic.png",
width = 500, height = 500)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.