Placing jitters in the center of the violin plot

38 Views Asked by At

I want to draw the black jitters right in the center of the violin plot. enter image description here

I am using this code lines

ggplot(df, aes(x=variable, y=value, fill=Treatment)) +
  geom_violin(trim = F, color ="black")+
  geom_boxplot(width=0.3, position = position_dodge(0.9))+
  scale_fill_manual(values=c('#82a1fa','red'))+
  geom_jitter(position = position_jitterdodge(jitter.width = 0.1, jitter.height = 0))
0

There are 0 best solutions below