Skip to content

Commit 40322c7

Browse files
committed
Adding documentation and bugfix from the merge
1 parent 8de1907 commit 40322c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/position-dodge.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#' (default) or `"y"`.
1919
#' @param reverse If `TRUE`, will reverse the default stacking order.
2020
#' This is useful if you're rotating both the plot and legend.
21+
#' @param stack_overlap Specifies if and how to stack the dodged geoms. Possible
22+
#' values are `"no"` (default), `"by_extent"` or `"by_center"`. This parameter
23+
#' implements the dodge and stack functionality together. Use `"by_extent"` for
24+
#' columns and `"by_center"` for errorbars.
2125
#' @family position adjustments
2226
#' @eval rd_aesthetics("position", "dodge")
2327
#'
@@ -175,6 +179,7 @@ PositionDodge <- ggproto("PositionDodge", Position,
175179
strategy = pos_dodge,
176180
n = params$n,
177181
check.width = FALSE,
182+
stack_overlap = params$stack_overlap,
178183
reverse = !params$reverse # for consistency with `position_dodge2()`
179184
)
180185
flip_data(collided, params$flipped_aes)

0 commit comments

Comments
 (0)