有人使用过igraph的vertex.shape功能吗?这里http://cneurocvs.rmki.kfki.hu/igraph/doc/R/igraph.vertex.shapes.html看起来很不错,但我无法理解。有没有可以运行的代码示例?
顶点就是你的图中的节点。当你绘制它们时,可以将它们变成矩形、圆形或其他一些形状,无论哪种看起来最漂亮。
首先查看?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
参数允许的值。
igraph
包并加载了它,但在我的控制台中执行names(igraph:::.igraph.shapes)
命令却返回了NULL
。此外,对于?igraph.vertex.shapes
也有一个重定向,它会将您重定向到http://127.0.0.1:27356/library/igraph/html/shapes.html
。 - Erdogan CEVHER