I don't understand why the dots for ID 2,6,8,10 won't align vertically like they do in 1,3,4,7,9.

The offset is affected by stackratio, but why doesn't it affect all the groups?

```
ggplot(sleep, 
       aes(x=ID,fill=group,y=extra))+
  geom_dotplot(binaxis = 'y',
               method="histodot",
               stackgroups = TRUE,
               binpositions="bygroup",
               stackratio=1,
               binwidth=0.1, 
               stackdir = "center",
               dotsize = 3)

```

![plot](https://i.imgur.com/xiTslOn.png)

Another example is 

```
ggplot(mtcars, aes(x = factor(am),fill = factor(cyl), y = mpg)) +
  geom_dotplot(binaxis = "y",stackgroups = TRUE, stackdir = "center", binpositions="all")

```

Here `stackgroups = TRUE` makes everything offset weirdly.

![img](https://i.imgur.com/l48yAEA.png)

Can something be done here, or is there another way to get the samme?