有没有人使用过 igraph 的 vertex.shape 功能?这个http://cneurocvs.rmki.kfki.hu/igraph/doc/R/igraph.vertex.shapes.html很有希望,但我无法理解。有没有人有工作代码的例子?
问问题
13596 次
1 回答
14
顶点只是图中的节点。当您绘制它们时,您可以将它们设置为矩形或圆形或其他一些形状。任何你认为看起来最漂亮的东西。
首先查看页面上的示例?igraph.vertex.shapes
。
g <- graph.ring(10, dir=TRUE, mut=TRUE)
plot(g, vertex.shape="rectangle", layout=layout.circle)
参数的允许值vertex.shape
由下式给出
names(igraph:::.igraph.shapes)
[1] "circle" "square" "csquare" "rectangle" "crectangle"
[6] "vrectangle" "none"
请参阅参数?layout
的允许值layout
。
于 2011-09-15T11:19:55.427 回答