无法在 igraph 网络中设置边的颜色

Can't set colors of edges in igraph network

当我尝试使用 edge.color 属性设置边缘颜色时,它不起作用(我得到默认的灰色)。但是,当我在 plot 命令中放置相同的属性时,它就起作用了!我做错了什么? (我在 linux 框上使用 R 版本 3.4.1 (2017-06-30) -- "Single Candle")。 arrow.sizewidth 等其他属性对我来说工作正常,只是颜色不行!

根据这个 igraph 的 Rpub 教程,https://rpubs.com/kateto/netviz 我应该可以用两种方式来做...

require(igraph)
data<-matrix(rexp(25, rate=.1), ncol=5)
gr<-graph.adjacency(data,mode="directed",weighted=T,diag=T)

# this gives gray default edges, WHY?
E(gr)$edge.color<-"blue"
plot(gr)

# this give blues edges:
plot(gr,edge.color="blue") 

使用 color,而不是 edge.color(因为它是边缘属性,所以这已经很明确了)。

E(gr)$color<-"blue"
plot(gr)