draw_key_hexagon: Draw a Hexagon

Description Usage Arguments Value See Also Examples

View source: R/draw_key_hexagon.r

Description

The default legend key drawing function for stat_summaries_hex. This function can be used as key_glyph parameter by any layer.

Usage

1
draw_key_hexagon(data, params, size)

Arguments

data

A single row data frame containing the scaled aesthetics to display in this key

params

A list of additional parameters supplied to the geom.

size

Width and height of key in mm.

Value

A hexagonal polygonGrob.

See Also

The legend key drawing functions built into ggplot: draw_key.

Examples

1
2
3
4
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
  geom_hex(key_glyph = 'hexagon') +
  guides(fill = 'legend')

flying-sheep/ggplot.multistats documentation built on Nov. 12, 2019, 3:30 a.m.