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

  • Home
  • SEARCH
  • 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 8984905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:13:07+00:00 2026-06-15T21:13:07+00:00

I have 6 datasets for which I need to plot boxplot using R in

  • 0

I have 6 datasets for which I need to plot boxplot using R in a single plot. Out of 6 , 2 are of more importance so I want to highlight them by shading their background . Is it possible to selectively shade background behind the boxplot for few leaving others as it is using boxplot() function of R ?
Just like this image

  • 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-15T21:13:08+00:00Added an answer on June 15, 2026 at 9:13 pm

    You can try to use function rect() and give coordinates of lower left and upper right corner and color. Argument lty=0 ensures that there are no borders. Function boxplot() is used twice because rect() will hide first boxplots. add=TRUE in second boxplot() ensures that plot is made on the same graphic.

    a<-rep(c("g1","g2","g3","g4","g5","g6"),each=10)
    b<-rnorm(60)    
    boxplot(b~a)
    rect(0.5,-3,1.5,3,col="grey75",lty=0)
    rect(2.5,-3,3.5,3,col="grey75",lty=0)
    boxplot(b~a,add=TRUE)
    

    enter image description here

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

Sidebar

Related Questions

i have some queries which group datasets and count them, e.g. SELECT COUNT(*) FROM
(Using Visual Studio 2005 / .NET 2.0) I have a DataSet which is being
I currently have a single DataSet declared which contains 3 tables. For sake of
I have a simple web service which serves XML datasets (they can be as
I need to have very high-performance loop going over large datasets. I need to
I have a dataset with 100 000 datapoints which I have to plot on
I am working on a project which will be using large datasets (both 2D
I need to match the samples in two datasets. What I have is the
I have DataSet which has 3 columns. Name - insurance comp. name - treatmentDate
I have a 2-class dataset on which I should apply a binary classification algorithm.

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.