build_df {ggplot} | R Documentation |
Build data frome for a plot with given data and ... (dots) arguments
build_df(plot, data = plot$data, aesthetics=NULL)
plot |
plot object |
data |
data frame to use |
aesthetics |
extra arguments supplied by user that should be used first |
Depending on the arguments supplied to plot_add
we need
to stitch together a data frame using the defaults from plot$defaults
where the user hasn't explicitly specified otherwise.
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>