required_aes
A character vector naming aesthetics that are necessary
to compute the position adjustment.
default_aes
A mapping of default values for aesthetics.
use_defaults
Description
A function method for completing the layer data by filling in default
position aesthetics that are not present. These can come from two sources:
either from the layer parameters as static, unmapped aesthetics or from
the default_aes field.
Usage
Position$use_defaults(data, params)
Arguments
data
A data frame of the layer's data
params
A list of fixed aesthetic parameters
Value
A data frame with completed layer data
setup_params
Description
A function method for modifying or checking the parameters based on the
data. The default method returns an empty list.
Usage
Position$setup_params(data)
Arguments
data
A data frame with the layer's data.
Value
A list of parameters
setup_data
Description
A function method for modifying or checking the data. The default method
checks for the presence of required aesthetics.
Usage
Position$setup_data(data, params)
Arguments
data
A data frame with the layer's data.
params
A list of parameters coming from the setup_params()
method
Value
A data frame with layer data
compute_layer
Description
A function method orchestrating the position adjust of the entire layer.
The default method splits the data and passes on adjustment tasks to the
panel-level compute_panel(). In addition, it finds the correct scales
in the layout object to pass to the panel computation.
Usage
Position$compute_layer(data, params, layout)
Arguments
data
A data frame with the layer's data.
params
A list of parameters coming from the setup_params()
method
layout
A <Layout> ggproto object.
Value
A data frame with layer data
compute_panel
Description
A function method executing the position adjustment at the panel level.
The default method is not implemented.
Usage
Position$compute_panel(data, params, scales)
Arguments
data
A data frame with the layer's data.
params
A list of parameters coming from the setup_params()
method
scales
A list of pre-trained x and y scales. Note that the
position scales are not finalised at this point and reflect the initial
data range before computing stats.
Value
A data frame with layer data
aesthetics
Description
A function method for listing out custom position aesthetics for this
position adjustment.
Usage
Position$aesthetics()
Value
A character vector of aesthetic names.