Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6663.

It has the fix to treat multi-row groups correctly, by dodging only the first row of each group and then reinserting the results over multiple rows.
Notably, it does not have fancy detection of when this should apply.
It is currently controlled by position_dodge2(group_row) but ideally, this would be detected automatically.

devtools::load_all("~/packages/ggplot2/")
#> ℹ Loading ggplot2

ggridges::Aus_athletes |>
  ggplot(aes(sport, height, fill = sex)) +
  geom_violin(position = position_dodge2(group_row = "many"))

Created on 2025-09-30 with reprex v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix geom_violin(position = "dodge2")
1 participant