Hi people,
I have a question that should be simple. I am new using iGraph and I am trying to plot by tklplot. The graph has the following characteristics:
Vertices: 856 Edges: 675 Directed: TRUE
I just want to shape to different ethnic groups that are of course attributes V(g)$ethnic
of the vertices, in the graph.
I had a problem with square
, but it did have a bug.
In the lines downwards I just become circle shaped vertices . My idea is to differentiate the vertices with the attribute V(g)$ethnic
, if I recall it, there is no problem , but the plot output is not true , and no major problem is reported by R
as follows
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)
regards
Vladimir