Has anyone used igraph's vertex.shape functionality? This http://cneurocvs.rmki.kfki.hu/igraph/doc/R/igraph.vertex.shapes.html was promising but I could not understand. Does anyone have an example of working code?
有没有人用过igraph的vertex.shape功能?这http://cneurocvs.rmki.kfki.hu/igraph/doc/R/igraph.vertex.shapes.html很有希望,但我无法理解。有没有人有一个工作代码的例子?
1 个解决方案
#1
10
The verticies are just the nodes in your graph. When you plot them you can have them as rectangles or circles or some other shapes. Whatever you think looks prettiest.
verticies只是图表中的节点。绘制它们时,可以将它们设置为矩形或圆形或其他形状。无论你认为什么看起来最漂亮。
Start by looking at the example on the ?igraph.vertex.shapes
page.
首先查看?igraph .vertex.shapes页面上的示例。
g <- graph.ring(10, dir=TRUE, mut=TRUE)
plot(g, vertex.shape="rectangle", layout=layout.circle)
The allowed values for the vertex.shape
argument are given by
vertex.shape参数的允许值由下式给出
names(igraph:::.igraph.shapes)
[1] "circle" "square" "csquare" "rectangle" "crectangle"
[6] "vrectangle" "none"
See ?layout
for the allowed values for the layout
argument.
请参阅布局,了解布局参数的允许值。
#1
10
The verticies are just the nodes in your graph. When you plot them you can have them as rectangles or circles or some other shapes. Whatever you think looks prettiest.
verticies只是图表中的节点。绘制它们时,可以将它们设置为矩形或圆形或其他形状。无论你认为什么看起来最漂亮。
Start by looking at the example on the ?igraph.vertex.shapes
page.
首先查看?igraph .vertex.shapes页面上的示例。
g <- graph.ring(10, dir=TRUE, mut=TRUE)
plot(g, vertex.shape="rectangle", layout=layout.circle)
The allowed values for the vertex.shape
argument are given by
vertex.shape参数的允许值由下式给出
names(igraph:::.igraph.shapes)
[1] "circle" "square" "csquare" "rectangle" "crectangle"
[6] "vrectangle" "none"
See ?layout
for the allowed values for the layout
argument.
请参阅布局,了解布局参数的允许值。