Skip to contents

Like any legend key glyphs, this key can be used to display arrows in a legend.

Usage

draw_key_arrow(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

An <arrow_path> grob

Examples

ggplot(mpg, aes(displ, colour = factor(cyl))) +
  geom_density(key_glyph = draw_key_arrow)