build_ggplot | R Documentation |
build_ggplot()
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. The ggplot_build()
function is vestigial and build_ggplot()
should be used instead.
build_ggplot(plot, ...)
ggplot_build(plot, ...)
get_layer_data(plot = get_last_plot(), i = 1L)
layer_data(plot = get_last_plot(), i = 1L)
get_panel_scales(plot = get_last_plot(), i = 1L, j = 1L)
layer_scales(plot = get_last_plot(), i = 1L, j = 1L)
get_layer_grob(plot = get_last_plot(), i = 1L)
layer_grob(plot = get_last_plot(), i = 1L)
plot |
ggplot object |
... |
Not currently in use. |
i |
An integer. In |
j |
An integer. In |
get_layer_data()
, get_layer_grob()
, and get_panel_scales()
are helper
functions that return the data, grob, or scales associated with a given
layer. These are useful for tests.
print.ggplot()
and benchplot()
for
functions that contain the complete set of steps for generating
a ggplot2 plot.
The build step section of the online ggplot2 book.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.