# NOT RUN {
# create 20 scale-free graphs and place them in a common layout
graphs <- lapply(sample(5:20, 20, replace=TRUE),
barabasi.game, directed=FALSE)
layouts <- lapply(graphs, layout_with_kk)
lay <- merge_coords(graphs, layouts)
g <- disjoint_union(graphs)
# }
# NOT RUN {
plot(g, layout=lay, vertex.size=3, labels=NA, edge.color="black")
# }
Run the code above in your browser using DataLab