Skip to content

Commit 7aad83b

Browse files
committed
document new method
1 parent 43d81fb commit 7aad83b

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

R/facet-.R

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,49 @@ Facet <- ggproto("Facet", NULL,
346346

347347
## Layout$render() -------------------------------------------------------
348348

349+
#' @field draw_panel_content
350+
#' **Description**
351+
#'
352+
#' A function method to assemble the panel contents. It delegates the
353+
#' `draw_back()` and `draw_front()` methods, as well as `Coord$draw_panel()`.
354+
#'
355+
#' **Usage**
356+
#' ```r
357+
#' Facet$draw_panel_content(
358+
#' panels,
359+
#' layout,
360+
#' x_scales,
361+
#' y_scales,
362+
#' ranges,
363+
#' coord,
364+
#' theme,
365+
#' params,
366+
#' ...
367+
#' )
368+
#' ```
369+
#' **Arguments**
370+
#' \describe{
371+
#' \item{`panels`}{A list parallel to layers. Each element is another list
372+
#' with grobs for each panel, generated by `Layer$draw_geom()`.}
373+
#' \item{`layout`}{A data frame computed by the `compute_layout()` method.
374+
#' Typically contains the faceting variables, `ROW`, `COL`, `PANEL`,
375+
#' `SCALE_X` and `SCALE_Y` variables.}
376+
#' \item{`x_scales`,`y_scales`}{A list of panel scales for each `SCALE_X`
377+
#' and `SCALE_Y` level respectively.}
378+
#' \item{`ranges`}{A list of panel parameters from the
379+
#' `setup_panel_params()` augmented with position guides.}
380+
#' \item{`coord`}{A `<Coord>` ggproto object.}
381+
#' \item{`data`}{A list of data frames containing layer data.}
382+
#' \item{`theme`}{A [complete theme][complete_theme()] object.}
383+
#' \item{`params`}{A list of parameters coming from the `setup_params()`
384+
#' method.}
385+
#' \item{`...`}{Currently not in use.}
386+
#' }
387+
#'
388+
#' **Value**
389+
#'
390+
#' A list of grobs, one for each level of the `PANEL` layout variable. Grob
391+
#' can be `zeroGrob()` to draw nothing.
349392
draw_panel_content = function(self, panels, layout, x_scales, y_scales,
350393
ranges, coord, data, theme, params, ...) {
351394
facet_bg <- self$draw_back(

man/Facet.Rd

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

0 commit comments

Comments
 (0)