library(ggplot2)
dat <- data.frame(x = rep(1, 500), y = rep(1, 500),
group = sample(LETTERS[1:2], 500, replace = TRUE))
ggplot(dat, aes(x, y, shape = group, color = group)) +
geom_point(position = position_jitterdodge_ellipse(jitter.width = 0.5,
jitter.height = 0.5,
dodge.width = 1)) +
coord_cartesian(xlim = c(0, 2), ylim = c(0, 2))
Run the code above in your browser using DataLab