3
Je voudrais ajouter un second cercle interne aux sommets actuels. Il devrait être proportionnel à une certaine variable.igraph R | Comment ajouter un deuxième cercle interne pour chaque noeud?
Je sais déjà comment faire pour le cercle principal, qui est, la taille du sommet.
variable1 <- c(20,40,60) # this will define the size of the vertices
g1 <- graph(edges=c(1,2, 2,3, 3,1), n=3, directed=F)
V(g1)$size <- variable1 # this assigns the vertices size to the igraph object 'g1'
plot(g1)
variable2 <- c(10,20,30) # this would be needed for a second, internal circle, ideally in a different color
Des idées?
trick Nice. Est-il possible de faire commencer les arêtes à partir de l'anneau externe? – fibar
@fibar Oui, ajoutez simplement 'edge.lty =" blank "' au second. À l'état actuel, il recouvre un deuxième ensemble d'arêtes. – lukeA