stat_summary_hex(mapping = NULL, data = NULL, geom = "hex",
position = "identity", bins = 30, drop = TRUE, fun = mean, ...)
aes
or aes_string
. Only needs to be set
at the layer level if you are overriding the plot defaults.stat_binhex
fun
is NA
.fun
stat_summary2d
is hexagonal version of stat_summary
. The data are devided by x
and y
.
z
in each cell is passed to arbitral summary function.
stat_summary-hex
requires the following aesthetics:
x
: horizontal positiony
: vertical positionz
: value passed to the summary function# Specifying function d + stat_summary_hex(fun = function(x) sum(x^2)) d + stat_summary_hex(fun = var, na.rm = TRUE)
stat_summary2d
for rectangular summarization. stat_bin2d
for the hexagon-ing options.