From 6ed2ae585929390bf418735b612593554eb84b76 Mon Sep 17 00:00:00 2001 From: Javlon Isomurodov Date: Wed, 10 Aug 2022 00:59:33 +0500 Subject: [PATCH] fix misplacing points in position_dodge2 Fixes bug which misplaced geom objects when it had zero width. --- R/position-dodge2.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/position-dodge2.r b/R/position-dodge2.r index a4c5fdc8ba..e511b03721 100644 --- a/R/position-dodge2.r +++ b/R/position-dodge2.r @@ -138,7 +138,7 @@ find_x_overlaps <- function(df) { overlaps[1] <- counter <- 1 for (i in seq_asc(2, nrow(df))) { - if (is.na(df$xmin[i]) || is.na(df$xmax[i - 1]) || df$xmin[i] >= df$xmax[i - 1]) { + if (is.na(df$xmin[i]) || is.na(df$xmax[i - 1]) || df$xmin[i] > df$xmax[i - 1]) { counter <- counter + 1 } overlaps[i] <- counter