diff --git a/NEWS.md b/NEWS.md index 6579c613b1..70d6ab79b7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -53,6 +53,10 @@ * `geom_contour()` now accepts a function in the `breaks` argument (@eliocamp, #4652). +* Updated documentation for `geom_contour()` to correctly reflect argument +precedence between `bins` and `binwidth`. (@eliocamp, #4651) + + # ggplot2 3.3.5 This is a very small release focusing on fixing a couple of untenable issues that surfaced with the 3.3.4 release diff --git a/R/geom-contour.r b/R/geom-contour.r index 4cdb0cd234..df156c2f94 100644 --- a/R/geom-contour.r +++ b/R/geom-contour.r @@ -17,8 +17,8 @@ #' @inheritParams layer #' @inheritParams geom_point #' @inheritParams geom_path -#' @param bins Number of contour bins. Overridden by `binwidth`. -#' @param binwidth The width of the contour bins. Overridden by `breaks`. +#' @param binwidth The width of the contour bins. Overridden by `bins`. +#' @param bins Number of contour bins. Overridden by `breaks`. #' @param breaks One of: #' - Numeric vector to set the contour breaks #' - A function that takes the range of the data and binwidth as input diff --git a/man/geom_contour.Rd b/man/geom_contour.Rd index ae5b40a987..e091362bea 100644 --- a/man/geom_contour.Rd +++ b/man/geom_contour.Rd @@ -98,9 +98,9 @@ often aesthetics, used to set an aesthetic to a fixed value, like \code{colour = "red"} or \code{size = 3}. They may also be parameters to the paired geom/stat.} -\item{bins}{Number of contour bins. Overridden by \code{binwidth}.} +\item{bins}{Number of contour bins. Overridden by \code{breaks}.} -\item{binwidth}{The width of the contour bins. Overridden by \code{breaks}.} +\item{binwidth}{The width of the contour bins. Overridden by \code{bins}.} \item{breaks}{One of: \itemize{