Is there a simple way to add a legend explaining vertex colors to a fruchterman reingold plot in R?
<p>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? </p>

<pre><code>library(igraph)

a &lt;- graph.adjacency(sport,mode="undirected")

plot(a,layout=layout.fruchterman.reingold, vertex.size=6, vertex.color=portsmall$G3)
</code></pre>

<p>Here is a impage of my plot with colored vertices:</p>

<p><a href="https://i.stack.imgur.com/0vc3j.png" rel="nofollow noreferrer">https://i.stack.imgur.com/0vc3j.png</a></p>