Skip to content

Commit 2882abc

Browse files
committed
Ensure computed breaks are not out-of-bounds
1 parent 0d0de37 commit 2882abc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/scale-.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ ScaleBinned <- ggproto("ScaleBinned", Scale,
10711071
breaks <- seq(limits[1], limits[2], length.out = n.breaks + 2)
10721072
breaks <- breaks[-c(1, length(breaks))]
10731073
}
1074+
breaks <- oob_discard(breaks, limits)
10741075

10751076
# Ensure terminal bins are same width if limits not set
10761077
if (is.null(self$limits)) {

0 commit comments

Comments
 (0)