"random" points distributed like geom_violin()

I've been using the ggbeeswarm package, and really liking it. But I can't figure out how to get it to adjust the width of the point distribution based on the density - similar to how geom_violin() works. I've given an example below - ideally, it would be possible to have the points inside the violin in the third column as well. Something analogous to geom_violin(scale = 'area'). Is there a package that does this?

I've also posted this as an issue on the ggbeeswarm github:


dt.tmp <- data.table(x = c('a', 'b', 'c'), 
                     y = rnorm(300))
dt.tmp[x == 'c', y := runif(100, -4, 4)]

ggplot(dt.tmp, aes(x=x, y=y)) + 
  geom_violin() +


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.