I would like to plot a histogram with mean (average) value on it (e.g. we could mark it with a blue and bold line).
I tried to do it using plot command, but even if I set the parameter add=TRUE
it didn’t work.
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.
You can use
abline()to add lines to a plot:Have also a look at
?parfor graphic parameters (likecolandlwd).In general, you can also plot lines using
lines():where
text()is used for adding text. The argumentcexdescribes the “character expansion factor”.Also, have a look at Quick-R for an overview of basic plotting with R.