We use dotplots in the classroom to introduce a bar chart because the binning concept confuses many students. So, we start from a point that is similar, but more intuitive:
x <- rnorm(100) qplot(x, geom = "bar") qplot(x, geom = "dotplot", method="histodot")

Since students do this according to their own data, the code should work without manual driving. However, geom_dotplot seems to use different default scaling values ββthan geom_bar . The y axis is not adjusted with the data, but, apparently, depends only on the size of the points. For instance:
x <- runif(1000) qplot(x, geom = "bar") qplot(x, geom = "dotplot", method="histodot")

How can I make geom_dotplot with stat_histodot scale the y axis exactly as it would for a histogram, or using smaller or overlapping points?
source share