How to customize notches in ggplot boxplot

Posted by cjy8709 on Stack Overflow See other posts from Stack Overflow or by cjy8709
Published on 2014-08-23T16:15:37Z Indexed on 2014/08/23 16:20 UTC
Read the original article Hit count: 145

Filed under:
|
|

I had a question on how to change/customize the upper and lower limit of a notch on a boxplot created by ggplot2. I looked through the function stat_boxplot and found that ggplot calculates the notch limits with the equation median +/- 1.58 * iqr / sqrt(n). However instead of that equation I wanted to change it with my own set of upper and lower notch limits.

My data has 4 factors and for each factor I calculated the median and did a bootstrap to get a 95% confidence interval of that median. Thus in the end I would like to change every boxplot to have its own unique notch upper and lower limit.

I'm not sure if this is even possible in ggplot and was wondering if people have an idea on how to do this?

Thanks again!

© Stack Overflow or respective owner

Related posts about r

    Related posts about ggplot2