Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9094607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:23:20+00:00 2026-06-16T23:23:20+00:00

Here is my example data: set.seed(1234) myd <- data.frame (SN = 1:100, myv =

  • 0

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:

enter image description here

I just need to achieve this goal. ggplot2 or other package solution are welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T23:23:21+00:00Added an answer on June 16, 2026 at 11:23 pm

    I do not get that plot but you can adjust to the differences.

    > boxplot(myd$myv, col = "lightgreen", ylim=c(-10,18))s
    

    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:

    > col2rgb("purple")
    #      [,1]
    #red    160
    #green   32
    #blue   240
    > rect(0.7, 4.5, 1.3, 8.2, col= rgb( red=160/255, green=32/255, blu=240/255, 0.4) )
    

    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 points function:

    > points(x=rep(1, sum( myd$myv > 8.2 | myd$myv < 4.5 )), 
             y= myd$myv[   myd$myv > 8.2 | myd$myv < 4.5 ] , 
             col="orange", pch=19, bg="orange")
    

    Built to your specs … :enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

set.seed(1234) mydata <- data.frame ( individual = factor(1:10), M1a = factor (sample (c(1,2),10, replace
Here is an example data set: data <- data.frame (author = c('bob', 'john', 'james'),
Here is some example data: data = data.frame(series = c(1a, 1b, 1e), reading =
Here is an example of the data set I am working with. I am
Here is the example data set i have : id | messageread | timestamp
I have a outsource data from : http://example.com/data/news.json Here is the example result after
Here is an example of one of our data calls in our DAL using
I have used KD-tree(libkdtree++) to store a multi-dimensional data set, and the requirements here
Here is my small dataset set.seed(123) X1 <- rep(1:3, each = 4) X2 <-
I've been having this strange problem with apply lately. Consider the following example: set.seed(42)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.