Change edge thickness in igraph plot R according to Edge Attributes -


i want change edge width of graph correspond edge.betweenness score.

 net <- read.csv("d:/sna/r/net.csv")  att <- read.csv("d:/sna/r/att.csv")  g <- graph.data.frame(net, vertices=att, directed=true)  pdf("network.pdf", pointsize=8)  plot(g, vertex.label=na, vertex.size=3, edge.width=edge.betweenness(g))  dev.off() 

i have tried creating edge betweenness score edge weight , assigning edge.width argument in plot function follows;

plot(g, vertex.label=na, vertex.size=3, edge.width=e(g)$width 

your example should work. alternatively, can write

e(g)$weight <- edge.betweenness(g) 

before plotting function.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -