Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ggplot_build

Build ggplot for rendering.


Description

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.

Usage

ggplot_build(plot)

layer_data(plot, i = 1L)

layer_scales(plot, i = 1L, j = 1L)

layer_grob(plot, i = 1L)

Arguments

plot

ggplot object

Details

layer_data, layer_grob, and layer_scales are helper functions that returns the data, grob, or scales associated with a given layer. These are useful for tests.

See Also

print.gganimintplot and benchplot for functions that contain the complete set of steps for generating a ggplot2 plot.


animint2

Animated Interactive Grammar of Graphics

v2020.9.18
GPL-3
Authors
Toby Hocking [aut, cre] (Original animint code), Hadley Wickham [aut] (Forked ggplot2 code), Winston Chang [aut] (Forked ggplot2 code), RStudio [cph] (Forked ggplot2 code), Nicholas Lewin-Koh [aut] (hexGrob), Martin Maechler [aut] (hexGrob), Randall Prium [aut] (cut_width), Susan VanderPlas [aut] (Animint GSOC 2013), Carson Sievert [aut] (Animint GSOC 2014), Kevin Ferris [aut] (Animint GSOC 2015), Jun Cai [aut] (Animint GSOC 2015), Faizan Khan [aut] (Animint GSOC 2016-2017), Vivek Kumar [aut] (Animint GSOC 2018), Himanshu Singh [aut] (Animint2 GSoC 2020)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.