I'm trying to do this
library(ggplot2)
foo <- 4
ggplot(mtcars, aes(x = wt, y = ..count.. + foo)) + geom_histogram()
And I'm getting
Error in eval(expr, envir, enclos) : object 'foo' not found
Oddly, this works
ggplot(mtcars, aes(x = wt + foo)) + geom_histogram()
Why is it that I can add foo to wt in aes(), but not to ..count..?