我试图将多层同心环绘制为图形的节点。
在这里,您可以找到what I did的简单版本,以及what I want to do。 请注意,也应该使用节点拖动边缘。
这是前者的代码:
library(igraph)
g=graph.empty(4)
g[1,2]=T
g[3,4]=T
resColors=matrix(as.character(list("green","red","green","green","green","grey","grey", "green","green","green","red","red","green","green","green","green","red","red","green","green")), nrow=vcount(g))
colors = list()
values = list()
for (i in 1:vcount(g)) {
values[[i]] = rep(1, times = ncol(resColors))
colors[i] = list(resColors[i,])
}
size=c(60,50,30,20)
plot(g, vertex.shape = "pie", vertex.pie = values, vertex.pie.color = colors, vertex.size = size)
谢谢, 纳特