powered by
The default legend key drawing function for stat_summaries_hex. This function can be used as key_glyph parameter by any layer.
stat_summaries_hex
key_glyph
draw_key_hexagon(data, params, size)
A hexagonal polygonGrob.
polygonGrob
A single row data frame containing the scaled aesthetics to display in this key
A list of additional parameters supplied to the geom.
Width and height of key in mm.
The legend key drawing functions built into ggplot: draw_key.
draw_key
library(ggplot2) ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_hex(key_glyph = 'hexagon') + guides(fill = 'legend')
Run the code above in your browser using DataLab