Learn R Programming

ggpattern (version 0.2.0)

draw_key_polygon_pattern: Key glyphs for legends

Description

Each geom has an associated function that draws the key when the geom needs to be displayed in a legend. These functions are called draw_key_*(), where * stands for the name of the respective key glyph. The key glyphs can be customized for individual geoms by providing a geom with the key_glyph argument (see layer() or examples below.)

Usage

draw_key_polygon_pattern(data, params, size, aspect_ratio = 1)

draw_key_boxplot_pattern(data, params, size, aspect_ratio = 1)

draw_key_crossbar_pattern(data, params, size, aspect_ratio = 1)

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.

aspect_ratio

the geom's best guess at what the aspect ratio might be.

Value

A grid grob.