Closed
Description
I'm trying to use preserve = "single" as you would with boxplots to maintain the sizes of the boxes when there are unused factors. While I figured it would work just the same way for violin plots, it appears to completely break them.
p <- ggplot(mtcars, aes(factor(cyl), mpg))
#works fine
p + geom_violin(aes(fill = factor(vs)))
#works fine
p + geom_violin(aes(fill = factor(vs)), position = "dodge")
#this doesn't work
p + geom_violin(aes(fill = factor(vs)), position = position_dodge(preserve = "single"))
The latter attempt above produces this: