Briefly, instead of dodging by a set of aesthetics, it uses the innate group to dodge.
Also using position = "jitterdodge" no longer fails due to missing parameters.
Some examples:
If there is no group it just jitters:
devtools::load_all("~/packages/ggplot2/")
#> ℹ Loading ggplot2
p <- ggplot(mpg, aes("x", displ)) +
geom_point(position = "jitterdodge")
p
If there is an explicit group, that is used to dodge:
p + aes(group = drv)
If there is an implicit automatic group, it dodges by that:
p + aes(colour = drv)
Explicit groups can be used to override implicit ones:
This PR aims to fix #3656.
Briefly, instead of dodging by a set of aesthetics, it uses the innate
group
to dodge. Also usingposition = "jitterdodge"
no longer fails due to missing parameters.Some examples:
If there is no
group
it just jitters:If there is an explicit group, that is used to dodge:
If there is an implicit automatic group, it dodges by that:
Explicit groups can be used to override implicit ones:
Created on 2024-05-31 with reprex v2.1.0