On Sat, Jan 12, 2013 at 12:51 PM, Biau David <[email protected]> wrote:

> Ok thanks, it works. I tried the legend() but it didn't work as expected.
>

Here is an example:

library(igraph)

g <- graph.ring(10)
V(g)$shape <- c("square", "circle")
V(g)$frame.color <- c("cyan", "orange")
V(g)$color <- "white"
E(g)$color <- c("blue", "green")

plot(g, margin=.2)
legend("topright", lty=c(NA, NA, 1, 1),
       col=c("cyan", "orange", "blue", "green"),
       pch=c(0,1,NA,NA),
       c("Foo", "Bar", "Foobar", "Barfoo"))

legend() is not quite perfect with vertex shapes, so yes, maybe igraph
would need its own legend function.

G.


> I will work on it. Congrats for your package, it is just great!
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to