## A simple ring
ring <- k.regular.game(10, 2)
plot(ring)
## k-regular graphs on 10 vertices, with k=1:9
k10 <- lapply(1:9, k.regular.game, no.of.nodes=10)
layout(matrix(1:9, nrow=3, byrow=TRUE))
sapply(k10, plot, vertex.label=NA)
Run the code above in your browser using DataCamp Workspace