get_phylopic | R Documentation |
This retrieves a PhyloPic silhouette as a vectorized or rasterized object.
get_phylopic(uuid = NULL, format = "vector", height = 512, preview = FALSE)
## S3 method for class 'Picture'
print(x, ...)
## S3 method for class 'phylopic'
print(x, ...)
uuid |
|
format |
|
height |
|
preview |
|
x |
A Picture or png array object, e.g.,
from using |
... |
Ignored |
The height
argument is ignored if the format
argument is not set
to "raster". If format
is "raster", the height
argument specifies the
height of the desired raster object. The width of this raster object will
be determined by the original aspect ratio of the silhouette. If a
pre-rendered raster exists with the desired dimensions, it will be
downloaded from PhyloPic. If not, the vector image from PhyloPic will be
used to render a raster object of the desired size.
If format
is "vector", a Picture object
is returned. If format
is "raster", a png array representing the
rasterized image is returned. Either way, the uuid and download url are
included as the "uuid" and "url" attributes, respectively.
## Not run:
# uuid
uuid <- "9fae30cd-fb59-4a81-a39c-e1826a35f612"
# Get data for an image
img_svg <- get_phylopic(uuid, format = "vector") # vector format
img_png <- get_phylopic(uuid, format = "raster") # raster format
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.