【发布时间】:2012-02-18 04:29:09
【问题描述】:
大家好,
我有一个应该很简单的问题。我是使用 iGraph 的新手,我正在尝试通过 tklplot 进行绘图。该图具有以下特点:
Vertices: 856 Edges: 675 Directed: TRUE
我只是想塑造不同的民族,当然是属性V(g)$ethnic的顶点,在图中。
我遇到了square 的问题,但它确实有一个错误。
在向下的线条中,我只是变成了圆形的顶点。我的想法是用属性V(g)$ethnic 区分顶点,如果我回忆一下,没有问题,但是绘图输出不正确,R没有报告大问题
如下
V(g)$color <- "green"
E(g)$color <- "black"
V(g)$nodesize=degree(g)*0.5
V(g)[V(g)$ethnic=="Mestizo"]$shape <- "rectangle"
V(g)[V(g)$ethnic=="Saraguro"]$shape <- "circle"
tkplot(g, layout=layout.kamada.kawai, edge.color=E(g)$color,
edge.arrow.size=0.3, vertex.label.dist=0.3, vertex.color=V(g)$color,
vertex.size=V(g)$nodesize, vertex.shape=V(g)$shape)
问候
弗拉基米尔
【问题讨论】: