我正在尝试创建一个边缘重叠的网络图。
require(igraph)
g <- graph( c(1,2, 1,2, 1,2, 1,2, 1,2, 1,2, 1,2, 1,2, 1,3, 2,3, 3,5), n=5, directed=FALSE )
V(g) #Vertex sequence
E(g) #Edge sequence
plot(g, layout=layout.circle, vertex.label=c("a","b","c","d","e"))
这导致'a'和'b'之间的8个非重叠边缘。如何用较粗的线替换这些非重叠线(与单线的8倍成比例)?
答案 0 :(得分:2)
使用curved
将FALSE
设置为width
,将count.multiple
设置为多个边的数量,请参阅手册中的详细信息:http://igraph.org/r/doc/plot.common.html
E(g)$curved <- FALSE
E(g)$width <- count.multiple(g)
plot(g, layout=layout.circle, vertex.label=c("a","b","c","d","e"))
答案 1 :(得分:0)
使用edge.curved = FALSE并获得结果。