Closed
Description
When looking at this SO question, I realized that when I set the bins
argument of geom_histogram
or stat_bin
, the resulting histogram has one more bin than the argument. For example:
ggplot(data = iris, aes(x = Sepal.Length)) + stat_bin(bins = 3)
which certainly doesn't seem like what most people would expect. Is this a zero-based index issue?
Apologies if I'm missing something obvious, and thanks for all your work.