Skip to content

Commit b9edb48

Browse files
committed
document the use of the layout argument
1 parent 7ae5358 commit b9edb48

File tree

8 files changed

+61
-0
lines changed

8 files changed

+61
-0
lines changed

R/facet-grid-.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ NULL
6969
#' labels and the interior axes get none. When `"all_x"` or `"all_y"`, only
7070
#' draws the labels at the interior axes in the x- or y-direction
7171
#' respectively.
72+
#'
73+
#' @section Layer layout:
74+
#' The [`layer(layout)`][layer()] argument in context of `facet_grid()` can take
75+
#' the following values:
76+
#' * `NULL` (default) to use the faceting variables to assign panels.
77+
#' * An integer vector to include selected panels. Panel numbers not included in
78+
#' the integer vector are excluded.
79+
#' * `"fixed"` to repeat data across every panel.
80+
#' * `"fixed_rows"` to repeat data across rows.
81+
#' * `"fixed_cols"` to repeat data across columns.
82+
#'
7283
#' @export
7384
#' @seealso
7485
#' The `r link_book("facet grid section", "facet#facet-grid")`

R/facet-null.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ NULL
66
#' @inheritParams facet_grid
77
#' @keywords internal
88
#' @export
9+
#' @section Layer layout:
10+
#' The [`layer(layout)`][layer()] argument in context of `facet_null()` is
11+
#' completely ignored.
912
#' @examples
1013
#' # facet_null is the default faceting specification if you
1114
#' # don't override it with facet_grid or facet_wrap

R/facet-wrap.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ NULL
4545
#' the exterior axes get labels, and the interior axes get none. When
4646
#' `"all_x"` or `"all_y"`, only draws the labels at the interior axes in the
4747
#' x- or y-direction respectively.
48+
#'
49+
#' @section Layer layout:
50+
#' The [`layer(layout)`][layer()] argument in context of `facet_wrap()` can take
51+
#' the following values:
52+
#' * `NULL` (default) to use the faceting variables to assign panels.
53+
#' * An integer vector to include selected panels. Panel numbers not included in
54+
#' the integer vector are excluded.
55+
#' * `"fixed"` to repeat data across every panel.
56+
#'
4857
#' @inheritParams facet_grid
4958
#' @seealso
5059
#' The `r link_book("facet wrap section", "facet#sec-facet-wrap")`

R/layer.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
#' @param params Additional parameters to the `geom` and `stat`.
7272
#' @param key_glyph A legend key drawing function or a string providing the
7373
#' function name minus the `draw_key_` prefix. See [draw_key] for details.
74+
#' @param layout Argument to control layout at the layer level. Consult the
75+
#' faceting documentation to view appropriate values.
7476
#' @param layer_class The type of layer object to be constructed. This is
7577
#' intended for ggplot2 internal use only.
7678
#' @keywords internal

man/facet_grid.Rd

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

man/facet_null.Rd

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

man/facet_wrap.Rd

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

man/layer.Rd

Lines changed: 4 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)