I have a boxplot with a dot representing the mean:

This is alright, but I’d like to show the confidence interval around the mean, for example in the following way:

How can I overlay these two plots in R?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A function like the following is easy to write.
Enter the x and y for the mean, the upper limit, lower limit, and width of the diamond. You can pass other parameters like lty for line type and col colour to segments as well.
Try it out with…