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