I am trying to change the color of the vertices in the graph generated by the graph. To be more specific, I have a 95-node graph created from an adjacency matrix, and I would like to color them according to their degree / interconnection / intrinsic value / proximity, but I assume that after I know how do it with one, I can do it with others.
So, I have encoded the basics of graph generation so far:
dataset <- read.csv ("~ / Google Drive / Chick M2 / Network Economy / Data / Collabs_2013.csv", sep = ";")
matrix <-as.matrix (data set)
adj <-graph.adjacency (matrix )
section (adj)
btw <-betweenness (adj, direct = FALSE)
Now I have a vector of 95 internode values, and I would like to plot a color gradient that follows the internode values (for example, from red for the lowest value to green to the highest). I suppose I need to mess up the attributes of the vertices, but I have no idea how to enter a vector as a color attribute.
source
share