My question is as follows: in R package ggplot2
- boxplots - how to mark the two points at the end of the whiskers (the upper and the lower) e.g with a "x" mark so ending up with a boxplot and two additional marks of "x" at the very upper end of the whisker and the other one would be at the very lower end of the lower whisker.
I have searched a lot in the internet for an answer but couldn't find. I could only add "x" mark on the boxplot by using the stat_summary and using mean function data.
How to do the other two points?
To be on the same page please use the mtcars
database of R and make boxplot
of mpg
as y axis and cyl
as x axis. Yu will end up with 3 boxplots according to the dataframe mtcars
.
According to R
The upper end defined as Q3+1.5*IQR
The lower end defined as Q1-1.5*IQR
Note: IQR = Q3 - Q1