-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Minimal reproducible example:
ggplot() + geom_quasirandom(aes(x, y), data.frame(x="A", y=c(1, 0.9999999999999)), groupOnX = TRUE)Warning messages:
1: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
2: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
3: In regularize.values(x, y, ties, missing(ties), na.rm = na.rm) :
collapsing to unique 'x' values
Might be related to tidyverse/ggplot2#4455 (comment) where geom_violin would produce the same error.
I was able to solve it in this case by rounding the y values:
ggplot() + geom_quasirandom(aes(x, y), data.frame(x="A", y=round(c(1, 0.9999999999999), 12)), groupOnX = TRUE)geom_beeswarm also has trouble handling values like this. The following silently drops one of the data points:
ggplot() + geom_beeswarm(aes(x, y), data.frame(x="A", y=c(1, 0.9999999999999)), groupOnX = TRUE)Metadata
Metadata
Assignees
Labels
No labels