geom_hex

geom_hex(mapping=NULL, data=NULL, stat="binhex", position="identity", ...)

Tile the plane with hexagons

This page describes geom_hex, see layer and qplot for how to create a complete plot from individual components.

What do you think of the documentation? Please let me know by filling out this short online survey.

Aesthetics

The following aesthetics can be used with geom_hex. Aesthetics are mapped to variables in the data with the aes function: geom_hex(aes(x = var)). Note that you do not need quotes around the variable name.

Scales control how the variable is mapped to the aesthetic and are listed after each aesthetic.

Aesthetic Default Related scales
xrequiredcontinuous, date, datetime, discrete
yrequiredcontinuous, date, datetime, discrete
colourNAbrewer, gradient, gradient2, gradientn, grey, hue, identity, manual
fillgrey50brewer, gradient, gradient2, gradientn, grey, hue, identity, manual
size0.5identity, manual, size
alpha1

Layers are divided into groups by the group aesthetic. By default this is set to the interaction of all categorical variables present in the plot.

Parameters

Parameters control the appearance of the geom. In addition to the parameters listed below (if any), any aesthetic can be used as a parameter, in which case it will override any aesthetic mapping.

Returns

This function returns a layer object.

Examples

> # See ?stat_binhex for examples 

What do you think of the documentation? Please let me know by filling out this short online survey.