Adding phylopic.org silhouettes to R plots

Over at phylopic.org there is a large and growing collection of silhouette images of all manner of organisms – everything from Emus to Staphylococcus. The images are free (both in cost, and to use), are available in vector (svg) and raster (png) formats at a range of resolutions, and can be searched by common name, scientific name and (perhaps most powerfully) phylogenetically.

[EDIT: as two commenters have pointed out, not all phylopic images are totally free of all restrictions on use or reuse: some require attribution, or are only free for non-commercial use. It’s best to check before using an image, either directly at the phylopic webpage, or by using the phylopic API]

Phylopic images are useful wherever it is necessary to illustrate exactly which taxon a graphical element pertains to, as pictures always speak louder than words.

Below I provide an example of using phylopic images in R graphics. I include some simple code to automatically resize and position a phylopic png within an R plot. The code is designed to preserve the original png’s aspect ratio, and to place the image at a given location within the plot.

A plot with phylopic logos

I should also point readers to Scott Chamberlain‘s R package fylopic, which provides the ability to make use of the phylopic API from within R, including the ability to search for and download silhouettes programatically.

If you find phylopic useful, I’m sure they would appreciate you providing them with silhouettes of your study species. More information on how to submit your images can be found here.

Advertisements

5 thoughts on “Adding phylopic.org silhouettes to R plots

  1. Mike Keesey (@tmkeesey)

    Cool example!

    One note to users: although all of the images are free, some do have restrictions. Be sure to check their licenses. Many require attribution. Some can’t be used commercially (including in for-profit journals) without special permission from the illustrator. And some can only be used in a work under a similar (ShareAlike) license.

    (The examples in this post are public domain — they have no such restrictions.)

    Reply
  2. jonxhill

    You might also wish to pull out the licence and credit as some (most?) images are under CC-by or similar, i.e. you need to give credit to the creator. You can do this using the API from phylopic: http://phylopic.org/api/

    Nice post on adding image to R plots though – should come in handy!

    Reply
  3. scrogster Post author

    Thanks to Mike and Jon for pointing out potential licensing issues with phylopic images. The two images I used in my example are public domain, but many phylopic images have more restrictive licenses. I’ve added a note to the original post. Best to check the license of each image you wish to use. Thanks again for the comments.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s