Skip to content

Commit b434351

Browse files
authored
Remove binwidth entirely from geom_bar() (#3819)
* remove outdated warning * update docs
1 parent 2ae36a2 commit b434351

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

R/geom-bar.r

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@
4141
#' rare event that this fails it can be given explicitly by setting `orientation`
4242
#' to either `"x"` or `"y"`. See the *Orientation* section for more detail.
4343
#' @param width Bar width. By default, set to 90% of the resolution of the data.
44-
#' @param binwidth `geom_bar()` no longer has a binwidth argument---if
45-
#' you use it you'll get a warning telling to you use
46-
#' [geom_histogram()] instead.
4744
#' @param geom,stat Override the default connection between `geom_bar()` and
4845
#' `stat_count()`.
4946
#' @examples
@@ -87,19 +84,10 @@ geom_bar <- function(mapping = NULL, data = NULL,
8784
stat = "count", position = "stack",
8885
...,
8986
width = NULL,
90-
binwidth = NULL,
9187
na.rm = FALSE,
9288
orientation = NA,
9389
show.legend = NA,
9490
inherit.aes = TRUE) {
95-
96-
if (!is.null(binwidth)) {
97-
warn("`geom_bar()` no longer has a `binwidth` parameter. Please use `geom_histogram()` instead.")
98-
return(geom_histogram(mapping = mapping, data = data,
99-
position = position, width = width, binwidth = binwidth, ...,
100-
na.rm = na.rm, show.legend = show.legend, inherit.aes = inherit.aes))
101-
}
102-
10391
layer(
10492
data = data,
10593
mapping = mapping,

man/geom_bar.Rd

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

0 commit comments

Comments
 (0)