Skip to content

Conversation

@willgearty
Copy link
Member

@willgearty willgearty commented Jul 10, 2025

This adds the ability to use phylopic silhouettes as vertices when plotting with igraph. The user must first activate the functionality using the activate_igraph() function, then they can use vertex.shape = "phylopic". I've included (nearly) all of the parameters from add_phylopic_base().

library(rphylopic)
#> You are using rphylopic v.1.5.0.9000. Please remember to credit PhyloPic contributors (hint: `get_attribution()`) and cite rphylopic in your work (hint: `citation("rphylopic")`).
library(igraph)
activate_igraph()
# create a simple graph
g <- make_ring(10)
# plot the graph with phylopics
plot(g, vertex.shape = "phylopic", vertex.color = rainbow(vcount(g)),
     vertex.name = "Gorilla")
#> Warning: You've used the `name` argument. You may want to use `verbose = TRUE`
#> to get attribution information for the silhouette(s).

Created on 2025-07-10 with reprex v2.1.1

TODO:

  • Add docs about igraph parameters
  • Add tests

Fixes #115

@willgearty willgearty added this to the 1.6.0 milestone Jul 10, 2025
@willgearty willgearty requested a review from LewisAJones July 10, 2025 22:12
@willgearty willgearty self-assigned this Jul 10, 2025
@willgearty
Copy link
Member Author

@schochastics would you be willing to take a look at this?

@schochastics
Copy link

This looks good to me!

@willgearty willgearty modified the milestones: 1.6.0, 1.7.0 Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration with igraph?

3 participants