igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] How to depict a Network with Donut shaped vertices in Igraph


From: Charles Novaes de Santana
Subject: [igraph] How to depict a Network with Donut shaped vertices in Igraph
Date: Mon, 3 Jul 2017 15:51:02 -0300

Dear all,

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 (and the resulting attached figure):

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) }

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 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,

Best,

Charles

--
Um axé! :)

--
Charles Novaes de Santana, PhD
https://github.com/cndesantana

Attachment: sample_ringnetwork.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]