# NOT RUN {
data(LeMis)
g <- graphjs(LeMis, main="Les Misérables", showLabels=TRUE)
print(g)
# }
# NOT RUN {
# The next example uses the `igraph` package.
library(igraph)
set.seed(1)
g <- sample_islands(3, 10, 5/10, 1)
i <- cluster_optimal(g)
g <- set_vertex_attr(g, "color", value=c("yellow", "green", "blue")[i$membership])
print(graphjs(g))
# }
Run the code above in your browser using DataLab