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