draw_key_hexagon: Draw a Hexagon

View source: R/draw_key_hexagon.r

draw_key_hexagonR Documentation

Draw a Hexagon

Description

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

Usage

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

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


ggplot.multistats documentation built on Sept. 25, 2024, 5:06 p.m.