ref_box creates a layer of reference boxes to be plotted behind a layer of
glyphs. Each box spans the full width and height of the glyph. Reference
boxes make it easier to determine the location of an object within a glyph
and to compare objects across glyphs. Reference boxes can also convey
information on their own through fill, colour, alpha, linetype, and (line)
size mappings. By default the fill and colour parameters of a reference box
match the grey and white color scheme of ggplot2 panels in
theme_grey.
Usage
ref_box(mapping = NULL, fill = "grey90", color = "white", ...)
Arguments
mapping
An aesthetic mapping, usually constructed with
aes.
fill
The color, as a character string, to be used as the fill if fill
is not specified in the mapping
color
The color, as a character string, to be used as the color if
color is not specified in the mapping
...
other arguments to be used as parameters in the reference box
layer
Details
ref_box is a second order function. It returns a function that can be used to
create a layer of reference boxes with the specified mapping and parameters.
The output of ref_box is intended to be passed as the reference argument for
geom_subplot or geom_subplot2d.