Add legend in igraph to annotate difference vertices size
<p>I have a graph in <code>igraph</code> with a vertex size that is coded for a value.<br>
I wish to add a legend with symbols (points in my case) with different sizes.
I tried the following code</p>

<pre><code>require(igraph)
er_graph &lt;- erdos.renyi.game(100, 5/100)
value&lt;-runif(100)
n&lt;-6
size_vec&lt;-seq_len(n)
sizeCut&lt;-cut(value,n)
vertex.size&lt;-size_vec[sizeCut]
plot(er_graph, vertex.label=NA, vertex.size=vertex.size)
legend('topleft',legend=levels(sizeCut),pt.cex=size_vec,col='black')
</code></pre>

<p>but end with legend without symbols
<a href="http://i.stack.imgur.com/XjAQ8.png" rel="nofollow">see example</a></p>

<p>Any sugestions how I go about this?</p>