I would like the size of the nodes in the graph to be dependent on the calculated betweenness centrality of the vertices. How can this be done?
My current code is below:
require(igraph)
g <- read.graph("data.graphml", "graphml")
plot(g,vertex.size = x,layout = layout.fruchterman.reingold)
How can I set 'x' to be a vertex size that is dependent on the betweeness centrality of a node?
Using
igraph
, and following the example in?betweenness
:(note numbers are node numbers, not betweenness value)
You may want to rescale your vertex size if you have lots of large values or otherwise improve the visualisation.
without the
/10
the vertices are way too large.