can one offset jitter points in ggplot boxplot
问题 In a ggplot boxplot , it is easy to use jitter to add the raw data points with varying degrees of jitter. With zero jitter the following code dat <- data.frame(group=c('a', 'b', 'c'), values = runif(90)) ggplot(dat, aes(group, values)) + geom_boxplot(outlier.size = 0) + geom_jitter(position=position_jitter(width=0), aes(colour=group), alpha=0.7) + ylim(0, 1) + stat_summary(fun.y=mean, shape=3, col='red', geom='point') + opts(legend.position = "right") + ylab("values") + xlab("group") produces