ggplot_build(plot)layer_data(plot, i = 1L)
ggplot_build
takes the plot object, and performs all steps necessary
to produce an object that can be rendered. This function outputs two pieces:
a list of data frames (one for each layer), and a panel object, which
contain all information about axis limits, breaks etc. layer_data
is a helper function which returns the data for a given layer.
print.ggplot
and benchplot
for
for functions that contain the complete set of steps for generating
a ggplot2 plot.