areas <- sample(c(4, 16, 64), 100, rep = TRUE, prob = c(60, 30, 10))
packing <- circleProgressiveLayout(areas)
if (FALSE) {
# Graph the result with ggplot
library(ggplot2)
dat.gg <- circleLayoutVertices(packing)
ggplot(data = dat.gg, aes(x, y, group = id)) +
geom_polygon(colour = "black", fill = "grey90") +
coord_equal() +
theme_void()
}
Run the code above in your browser using DataLab