I have the following code:
ggplot(violin_data_1, aes(x=cpod, y=clx, fill=factor(net_type))) + geom_violin() + ylim(0,100) + ylab("Clicks (n)") + xlab("CPOD ID") + labs(fill = "Net Type") + stat_summary(fun = "mean", geom = "crossbar", width = 0.1, colour = "black")
Which ends up as this plot:
I wonder why all means are projected in the middle violin of each CPOD station? I would like to have one crossbar for each violin.
Thanks in advance.