Skip to content

Commit 0b620cf

Browse files
committed
fix boundary = 0
1 parent b5f3039 commit 0b620cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/stat-bin2d.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ stat_bin_2d <- function(mapping = NULL, data = NULL,
1616
...,
1717
bins = 30,
1818
binwidth = NULL,
19+
boundary = 0,
1920
drop = TRUE,
2021
na.rm = FALSE,
2122
show.legend = NA,
@@ -32,6 +33,7 @@ stat_bin_2d <- function(mapping = NULL, data = NULL,
3233
bins = bins,
3334
binwidth = binwidth,
3435
drop = drop,
36+
boundary = boundary,
3537
na.rm = na.rm,
3638
...
3739
)
@@ -68,7 +70,7 @@ StatBin2d <- ggproto("StatBin2d", Stat,
6870

6971
compute_group = function(data, scales, binwidth = NULL,
7072
bins = 30, breaks = NULL,
71-
center = NULL, boundary = NULL, closed = NULL,
73+
center = NULL, boundary = 0, closed = NULL,
7274
origin = NULL, drop = TRUE) {
7375

7476
bins <- dual_param(bins, list(x = 30, y = 30))

0 commit comments

Comments
 (0)