I have this dotplot:
ggplot(mpg, aes(drv, hwy)) +
geom_dotplot(binwidth = 1, binaxis = 'y', stackdir = 'center')
which renders as
I want to color the dots by manufacturer. If I add a fill
aesthetic:
ggplot(mpg, aes(drv, hwy, fill = manufacturer)) +
geom_dotplot(binwidth = 1, binaxis = 'y', stackdir = 'center')
it renders as
It looks like adding color has defeated the stacking algorithm somehow, causing the dots to overlap. How do I fix this?