# stat_summary_hex

From ggplot2 v1.0.1
by Hadley Wickham

##### Apply funciton for 2D hexagonal bins.

Apply function for 2D hexagonal bins.

##### Usage

```
stat_summary_hex(mapping = NULL, data = NULL, geom = "hex",
position = "identity", bins = 30, drop = TRUE, fun = mean, ...)
```

##### Arguments

- mapping
- The aesthetic mapping, usually constructed with
`aes`

or`aes_string`

. Only needs to be set at the layer level if you are overriding the plot defaults. - data
- A layer specific dataset - only needed if you want to override the plot defaults.
- geom
- The geometric object to use display the data
- position
- The position adjustment to use for overlappling points on this layer
- bins
- see
`stat_binhex`

- drop
- drop if the output of
`fun`

is`NA`

. - fun
- function for summary.
- ...
- parameters passed to
`fun`

##### Aesthetics

`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 position`y`

: vertical position`z`

: 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.*Documentation reproduced from package ggplot2, version 1.0.1, License: GPL-2*

### Community examples

Looks like there are no examples yet.