- stackgroups = T binpositions = "all" , x.
ggplot(x, aes(x = x, y = y, fill=a)) +
geom_dotplot(binaxis = "y",
stackdir = "centerwhole",
method="dotdensity",
stackgroups = T,
binpositions="all")

, , : grid.arrange (. grid_arrange_shared_legend)
for (i in 1:3){
assign(paste0("g", i), ggplot(x %>% filter(x==levels(x$x)[i]), aes(x = x, y = y, fill=a)) + coord_cartesian(ylim=c(-3.5, 3.5))+
geom_dotplot(binaxis = "y", stackdir = "center", method="dotdensity", stackgroups = T, binpositions="all"))
}
grid_arrange_shared_legend(g1, g2, g3)
