igraph:边缘不会剪切到未修正图形中的顶点

时间:2012-05-29 09:43:25

标签: r igraph

当我更改vertex.size中的igraph时,边缘不会被裁剪到顶点,它们会在顶点旁边以几个点/像素结束。例如:

library(igraph)
set.seed(13)
g <- barabasi.game(500, directed = F)
plot(g, vertex.size = 2, edge.curved = T, vertex.label = NA, edge.arrow.mode = "-",
layout = layout.fruchterman.reingold)

似乎它不适用于有向图,因为箭头是在边缘的末端绘制的。

有没有办法解决这个问题?

1 个答案:

答案 0 :(得分:1)

我添加了edge.arrow.size,似乎解决了这个问题。

library(igraph)
set.seed(13)
g <- barabasi.game(500, directed = F)
plot(g, vertex.size = 2, edge.curved = T, vertex.label = NA, edge.arrow.mode = "-",   
edge.arrow.size=0.01,layout = layout.fruchterman.reingold)

enter image description here