I get an object df not found
when attempting this:
df <- data.frame(durationBin = 1:250, effort = 31:280)
ggplot(df, aes(x = durationBin, y = effort, fill = ..count../sum(df$durationBin == x))) +
stat_bin2d()
What I'm trying to do is have something like a density plot, except instead of density, I would like "the percentage of points in that column." (That is, all the points in the column is 100%, for each column)
Does anyone know how to do this?