Comment puis-je modifier l'apparence des noeuds dans igraph?
Question
Je voudrais exposer graphiques (arbres) avec deux types de nœuds:. Boîtes et cercles
Est-ce possible avec igraph et comment un exemple minimal ressembler?
La solution
library(igraph)
g <- graph.empty()
g <- add.vertices(g, 4,
label=c('a', 'b', 'c', 'd'),
shape=c('rectangle', 'rectangle', 'circle', 'circle'))
g <- add.edges(g, c(1, 2, 2, 3))
plot(g)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow