How to depict a Network with Donut shaped vertices with Igraph?

Viewed 162

I would like to depict a network with Ring/Donut Shaped Vertices. I did not find such a shape in Igraph documentation, but I found a pie shaped instead. Like the following code:

library(igraph)
g <- make_ring(10) 
values <- lapply(1:10, function(x) sample(1:10,3)) 
if (interactive()) { 
    plot(g, vertex.shape="pie", vertex.pie=values,            
         vertex.pie.color=list(heat.colors(5)), 
         vertex.size=seq(10,30,length=10), vertex.label=NA) 
}

Here the resulting image:

enter image description here

Do you know a way of turning a pie shaped vertex into a ring/donut shaped vertex using Igraph itself? I searched for a "vertex.pie.hole" parameter, but it does not exist. The easiest way I see to do this is to depict "white points" in the centroids of the vertices, but it is clearly not an ideal situation.

I also know it is possible to define our own vertex shape, but I must confess it is been really hard for me to do this for a ring/donut shape.

Thanks a lot for your attention,

1 Answers
Related