powered by
stat_summary2d(mapping = NULL, data = NULL, geom = NULL, position = "identity", bins = 30, drop = TRUE, fun = mean, ...)
stat_bin2d
fun
NA
aes
aes_string
stat_summary2d
stat_summary
x
y
z
stat_summary2d requires the following aesthetics:
stat_summary_hex
d <- ggplot(diamonds, aes(carat, depth, z = price)) d + stat_summary2d() # Specifying function d + stat_summary2d(fun = function(x) sum(x^2)) d + stat_summary2d(fun = var)
Run the code above in your browser using DataLab