Layer: one geom + stat + data/mapping overrides

Layer(
  geom = Geom(),
  stat = Stat(),
  mapping = NULL,
  data = NULL,
  params = list(),
  inherit = TRUE
)

Arguments

geom

A Geom subclass instance.

stat

A Stat subclass instance.

mapping

Layer-level aesthetic mapping (or NULL to inherit).

data

Layer-level data (or NULL to inherit the plot data).

params

Named list of literal visual parameters (e.g. size = 4).

inherit

Whether the layer merges the plot-level mapping into its own (TRUE for data layers; reference-line layers that synthesize their own data set FALSE).

Value

An S7 object of class Layer, as returned by the geom_*() constructors.