Skip to content

Commit 0a6927f

Browse files
authored
Make weight a recognised aesthetic (#4666)
1 parent 6704ea1 commit 0a6927f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# ggplot2 (development version)
22

3+
* `stat_bin_2d()` now correctly recognises the `weight` aesthetic
4+
(@thomasp85, #4646)
5+
36
* All geoms now have consistent exposure of linejoin and lineend parameters, and
47
the guide keys will now respect these settings (@thomasp85, #4653)
58

R/stat-bin2d.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ stat_bin2d <- stat_bin_2d
5050
#' @usage NULL
5151
#' @export
5252
StatBin2d <- ggproto("StatBin2d", Stat,
53-
default_aes = aes(fill = after_stat(count)),
53+
default_aes = aes(weight = 1, fill = after_stat(count)),
5454
required_aes = c("x", "y"),
5555

5656
compute_group = function(data, scales, binwidth = NULL, bins = 30,

0 commit comments

Comments
 (0)