I have a fruchterman reingold plot of 20 random students' extra curricular activities with the vertex color based on their final grades (numeric, ranging from 0-20) in an associated data set. Is there a way to to display a legend that prints the range for each vertex color?
library(igraph)
a <- graph.adjacency(sport,mode="undirected")
plot(a,layout=layout.fruchterman.reingold, vertex.size=6, vertex.color=portsmall$G3)
Here is a impage of my plot with colored vertices: