Closed
Description
Part 1
In this example the jitter is wider since v3.5.1.9000
ggplot(mtcars, aes(x = factor(cyl), y = disp, color = factor(cyl))) +
geom_point(
position = position_jitterdodge(
jitter.width = 0.4, jitter.height = 0, dodge.width = 0, seed = 42
)
)
Output of ggplot2 v3.5.1
Output of ggplot2 v3.5.1.9000
Part 2
Now, it gets even more interesting. If the grouping viable is discrete, but not a factor, the jitter is more narrow since v3.5.1.9000
mtcars %>%
mutate(new_var = c(rep("A", 11), rep("B", 11), rep("C", 10))) %>%
ggplot(aes(x = new_var, y = disp, color = new_var)) +
geom_point(
position = position_jitterdodge(
jitter.width = 0.4, jitter.height = 0, dodge.width = 0, seed = 42
)
)
Output of ggplot2 v3.5.1
Output of ggplot2 v3.5.1.9000
Conclusion
I am not sure what to make of this. I guess this might probably not hurt too much. However, in tidyplots
it triggers a lot of vdiffr
failures.
Metadata
Metadata
Assignees
Labels
No labels