Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add split violin and split sina #12

Open
jdlee opened this issue Mar 29, 2021 · 1 comment
Open

Add split violin and split sina #12

jdlee opened this issue Mar 29, 2021 · 1 comment

Comments

@jdlee
Copy link

jdlee commented Mar 29, 2021

It would be very useful to be able to create split violin plots such as this:
https://stackoverflow.com/questions/35717353/split-violin-plot-with-ggplot2

Extending this functionality to sina plots would be extremely useful:
https://ggforce.data-imaginist.com/reference/geom_sina.html

@erocoar
Copy link
Owner

erocoar commented May 26, 2022

Hi, that's a great suggestion 😄 I've added an optional split aesthetic to the half-violin plot, see example below:

ggplot() +
  geom_half_violin(
    data = ToothGrowth, 
    aes(x = as.factor(dose), y = len, split = supp, fill = supp),
    position = "identity"
  ) + 
  theme_minimal()

image

Hope it's still of use !

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

No branches or pull requests

2 participants