Skip to content

Commit 0e5eb13

Browse files
malcolmbarrettkarawoo
authored andcommitted
add i and j args documention to layer_* functions (#3074)
* add i and j args documention to layer_* functions * add () to functions in docs and update news * switch news to issue number * revert news * add () to function names in description * rebuild ggplot_build doc
1 parent 9a661d4 commit 0e5eb13

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

R/plot-build.r

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
#' Build ggplot for rendering.
22
#'
3-
#' `ggplot_build` takes the plot object, and performs all steps necessary
3+
#' `ggplot_build()` takes the plot object, and performs all steps necessary
44
#' to produce an object that can be rendered. This function outputs two pieces:
55
#' a list of data frames (one for each layer), and a panel object, which
66
#' contain all information about axis limits, breaks etc.
77
#'
8-
#' `layer_data`, `layer_grob`, and `layer_scales` are helper
8+
#' `layer_data()`, `layer_grob()`, and `layer_scales()` are helper
99
#' functions that returns the data, grob, or scales associated with a given
1010
#' layer. These are useful for tests.
1111
#'
1212
#' @param plot ggplot object
13+
#' @param i An integer. In `layer_data()`, the data to return (in the order added to the
14+
#' plot). In `layer_grob()`, the grob to return (in the order added to the
15+
#' plot). In `layer_scales()`, the row of a facet to return scales for.
16+
#' @param j An integer. In `layer_scales()`, the column of a facet to return
17+
#' scales for.
1318
#' @seealso [print.ggplot()] and [benchplot()] for
1419
#' functions that contain the complete set of steps for generating
1520
#' a ggplot2 plot.

man/ggplot_build.Rd

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)