-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
As others have pointed out (#688), having a position_dodge option such as drop = FALSE
would be really helpful for plots like this:
I know Hadley has given some helpful workaround suggestions (e.g. faceting) and has mentioned that this isn't within the scope of position_dodge but I am hoping that one more person raising the issue might help to make the change.
What's happening for some of my plots' x-categories is that there are only 2 data points (e.g. cases in Homozygous Alt in my plot), which is enough to generate a boxplot, but not a violin plot
geom_violin(alpha=0.4, position = position_dodge(width=0.9))
Because the 3rd green violin plot doesn't have a counterpart to "dodge", the violin plot is centered and therefore wider and not aligned with its corresponding boxplot which is quite sad to look at.
While faceting works to an extent:
It would look much cleaner for publication if I could do position = position_dodge(width=0.9), drop = FALSE)
I hope this suggestion is taken seriously and I really appreciate your help & time.
Chris