Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
* `theme(strip.placement.x)` and `theme(strip.placement.y)` can be used for more
granular control of strip placement when facetting. These have existed for some
time but were not previously documented (@arcresu, #6827).
* The `dir` argument of `facet_wrap()` is now documented with all
eight two-letter codes, clarifying their starting corner and fill
order (@CuiweiG, #6837).

# ggplot2 4.0.2

Expand Down
25 changes: 18 additions & 7 deletions R/facet-wrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,24 @@ NULL
#' the plot. Using `strip.position` it is possible to place the labels on
#' either of the four sides by setting \code{strip.position = c("top",
#' "bottom", "left", "right")}
#' @param dir Direction: either `"h"` for horizontal, the default, or `"v"`,
#' for vertical. When `"h"` or `"v"` will be combined with `as.table` to
#' set final layout. Alternatively, a combination of `"t"` (top) or
#' `"b"` (bottom) with `"l"` (left) or `"r"` (right) to set a layout directly.
#' These two letters give the starting position and the first letter gives
#' the growing direction. For example `"rt"` will place the first panel in
#' the top-right and starts filling in panels right-to-left.
#' @param dir Direction in which panels are laid out. Must be one of
#' the following two-letter codes, where the first letter indicates
#' the initial fill direction and the pair identifies the starting
#' corner:
#'
#' * `"lt"`: start in the top-left, fill left-to-right.
#' * `"tl"`: start in the top-left, fill top-to-bottom.
#' * `"lb"`: start in the bottom-left, fill left-to-right.
#' * `"bl"`: start in the bottom-left, fill bottom-to-top.
#' * `"rt"`: start in the top-right, fill right-to-left.
#' * `"tr"`: start in the top-right, fill top-to-bottom.
#' * `"rb"`: start in the bottom-right, fill right-to-left.
#' * `"br"`: start in the bottom-right, fill bottom-to-top.
#'
#' Use `nrow` or `ncol` to control the shape of the grid; `dir`
#' controls the fill order within that shape. The shorthand values
#' `"h"` and `"v"` are superseded and retained only for backward
#' compatibility.
#' @param axes Determines which axes will be drawn in case of fixed scales.
#' When `"margins"` (default), axes will be drawn at the exterior margins.
#' `"all_x"` and `"all_y"` will draw the respective axes at the interior
Expand Down
26 changes: 19 additions & 7 deletions man/facet_wrap.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading