hadley/ggplot2 — comment on commit 173094a923eb2ece8c57887755eca4e45df7b67d
File: R/geom-dotplot.r line 26
By briandk:

@wch - I've been playing around with `geom_dotplot()` and I absolutely love what you've done! I'm finding some things surprising, though. For example, the above code example bins data along the x-axis. If I want the flipped version of this plot, the following code works:

```r
p <- ggplot(mtcars, aes(x = mpg))
p <- p + geom_dotplot(method="histodot", binwidth = 1.5)
p + coord_flip()
```

![Image of binning mpg data long the y-axis][1]

I expected the code below to simply bin along the y-axis and produce an identical image to that above, but instead it throws an error:

```r
# This code will produce the following error
# Error: stat_bindot requires the following missing aesthetics: x
p <- ggplot(mtcars, aes(y = mpg))
p + geom_dotplot(method = "histodot",
binwidth = 1.5,
binaxis = "y"
)
```

Am I using the geom incorrectly? Is there something subtle that makes the above functionality tough to implement?

[1]: http://briandk.com/screenshots/BinningOnYaxis-20120226-003714.png