calc_aesthetics {ggplot2} | R Documentation |
Build data frome for a plot with given data and ... (dots) arguments
calc_aesthetics(plot, data = plot$data, aesthetics, ignore.extra = FALSE, env = plot$plot_env)
plot |
plot object |
data |
data frame to use |
aesthetics |
extra arguments supplied by user that should be used first |
ignore.extra |
|
env |
Depending on the layer, we need to stitch together a data frame using the defaults from plot$mapping and overrides for a given geom.
Arguments in dots are evaluated in the context of data
so that
column names can easily be references.
Also makes sure that it contains all the columns required to correctly
place the output into the row+column structure defined by the formula,
by using \expand.grid.df
to add in extra columns if needed.
Hadley Wickham <h.wickham@gmail.com>