View source: R/draw_key_hexagon.r
| draw_key_hexagon | R Documentation |
The default legend key drawing function for stat_summaries_hex.
This function can be used as key_glyph parameter by any layer.
draw_key_hexagon(data, params, size)
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. |
A hexagonal polygonGrob.
The legend key drawing functions built into ggplot:
draw_key.
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
geom_hex(key_glyph = 'hexagon') +
guides(fill = 'legend')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.