gpt4 book ai didi

r - 如何使用 igraph vertex.shape 功能

转载 作者:行者123 更新时间:2023-12-02 06:15:40 28 4
gpt4 key购买 nike

有人用过 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 参数的允许值。

关于r - 如何使用 igraph vertex.shape 功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7429162/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com