diff --git a/NEWS.md b/NEWS.md index 708d631e20..3e0f0c7410 100644 --- a/NEWS.md +++ b/NEWS.md @@ -117,6 +117,8 @@ the `nbin` argument (@teunbrand, #5882, #5036) * `after_stat()` and `after_scale()` throw warnings when the computed aesthetics are not of the correct length (#5901). +* `guide_colourbar()` now correctly hands off `position` and `available_aes` + parameters downstream (@teunbrand, #5930) * `geom_hline()` and `geom_vline()` now have `position` argument (@yutannihilation, #4285). * New function `get_strip_labels()` to retrieve facet labels (@teunbrand, #4979) diff --git a/R/guide-colorsteps.R b/R/guide-colorsteps.R index de10b51a04..52b6e1809d 100644 --- a/R/guide-colorsteps.R +++ b/R/guide-colorsteps.R @@ -52,6 +52,7 @@ guide_coloursteps <- function( even.steps = TRUE, show.limits = NULL, direction = NULL, + position = NULL, reverse = FALSE, order = 0, available_aes = c("colour", "color", "fill"), @@ -67,9 +68,11 @@ guide_coloursteps <- function( alpha = alpha, even.steps = even.steps, show.limits = show.limits, + position = position, direction = direction, reverse = reverse, order = order, + available_aes = available_aes, super = GuideColoursteps ) } diff --git a/man/guide_coloursteps.Rd b/man/guide_coloursteps.Rd index 97e66d6207..a2938df745 100644 --- a/man/guide_coloursteps.Rd +++ b/man/guide_coloursteps.Rd @@ -12,6 +12,7 @@ guide_coloursteps( even.steps = TRUE, show.limits = NULL, direction = NULL, + position = NULL, reverse = FALSE, order = 0, available_aes = c("colour", "color", "fill"), @@ -25,6 +26,7 @@ guide_colorsteps( even.steps = TRUE, show.limits = NULL, direction = NULL, + position = NULL, reverse = FALSE, order = 0, available_aes = c("colour", "color", "fill"), @@ -57,6 +59,9 @@ shown irrespective of the value of \code{show.limits}.} \item{direction}{A character string indicating the direction of the guide. One of "horizontal" or "vertical."} +\item{position}{A character string indicating where the legend should be +placed relative to the plot panels.} + \item{reverse}{logical. If \code{TRUE} the colourbar is reversed. By default, the highest value is on the top and the lowest value is on the bottom}