When both rphylopic and igraph are loaded, rphylopic registers a
custom vertex shape called "phylopic". Setting vertex.shape = "phylopic"
in igraph::plot.igraph() renders each vertex as a PhyloPic silhouette.
Details
The shape accepts the following vertex parameters, mirroring the
arguments of add_phylopic_base():
vertex.img,vertex.name,vertex.uuid— silhouette sourcevertex.size— silhouette height (in plot units)vertex.color,vertex.frame.color,vertex.alpha— fill, outline, opacityvertex.horizontal,vertex.vertical,vertex.angle— orientationvertex.hjust,vertex.vjust— anchoringvertex.remove_background,vertex.verbose,vertex.filter— passed toadd_phylopic_base()vertex.clip_scale— numeric scale factor controlling the clipping of the edges (default:0.7)
Note on interactive resizing
PhyloPic silhouettes are drawn as vector graphics on top of igraph's
base-graphics plot. Rendering as vectors preserves silhouette resolution;
however, when the graphics device is resized interactively the silhouettes
will not reposition along with the underlying graph layout. The graph nodes,
edges, and labels will redraw at their new coordinates while the
silhouettes remain anchored to their original device positions. To
restore alignment, re-run the plot() call after resizing.
