library(ggplot2)
# Use the sunflower position function to arrange N points
N <- 100
dat <- data.frame(
x = rep(1:4, times = N),
y = rep(1:4, times = N)
)
ggplot(dat, aes(x = x, y = y)) +
geom_point(size = 1, position = position_sunflower(density = 1, aspect_ratio = 1)) +
xlim(0, 5) +
ylim(0, 5) +
coord_equal()
Run the code above in your browser using DataLab