Problem with geom_point and geom_errorbar functions

I am trying to add mean points and error bars to my violin plot. I have managed to create the violin plot however when I type in the geom_point and geom_errorbar functions it says I am missing information with + icons. Can you see any problems with the script I used below?

ggplot(five,aes(x=Derivative,y=Score))+geom_violin()+scale_x_discrete(limits=c("None","134","138"))+geom_dotplot(binaxis="y",stackdir="center",dotsize=0.75)+ylim(0,4)+ylab("Score")+xlab("TLR4 Antagonist")+ geom_point(aes(x,y, col="black))+geom_errorbar(aes(x0=x, y0=y-0.3, x1=x, y1=y+0.3, width=0.2, col="black"))


Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

Even if the answer turns out to be relatively simple, if the problem is difficult because it requires reverse-engineering, it will probably lie undiscovered.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.