Skip to content

Commit 1cf6825

Browse files
committed
Only update limits if get_breaks() has updated them
1 parent 9af0346 commit 1cf6825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/scale-binned.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ScaleBinnedPosition <- ggproto("ScaleBinnedPosition", ScaleBinned,
7070

7171
map = function(self, x, limits = self$get_limits()) {
7272
breaks <- self$get_breaks(limits)
73-
limits <- range(breaks, limits) # update limits
73+
limits <- self$get_limits() # get_breaks() may have updated this
7474
all_breaks <- unique0(sort(c(limits[1], breaks, limits[2])))
7575

7676
if (self$after.stat) {

0 commit comments

Comments
 (0)