Here is my example data:
set.seed(1234)
myd <- data.frame (SN = 1:100, myv = round (rnorm(100, 5, 5), 2))
boxplot(myd$myv, col = "lightgreen")
I want to highlight the portion of the boxplot that falls within the confidence interval between 4.5 to 8.2. Also I want to display how datapoints that do not fall in the confidence interval (> 8.2 and less than 4.5). The output would like this:
I just need to achieve this goal. ggplot2 or other package solution are welcome.
I do not get that plot but you can adjust to the differences.
One way to get transparent colors is extract the RGB values from a named color with col2rgb and then pass back to rgb with appropriately scaled values:
Need to construct a logical vector that can select the point values and also be the basis for “counting” the number of such values for the
pointsfunction:Built to your specs … :