- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a rectangle inside boxplot in base R?
To create a rectangle inside boxplot in base R, we can use rect function after creating the boxplot. The rect function has many arguments but for the creation of a rectangle only first four are necessary and these are defined as xleft - a vector (or scalar) of left x positions, ybottom - a vector (or scalar) of bottom y positions, xright - a vector (or scalar) of right x positions and ytop - a vector (or scalar) of top y positions.
x<-rnorm(200,100,25) boxplot(x) rect(0,40,50,100)
y<-rnorm(100,50,2) boxplot(y) rect(0,45,50,50)
- Related Articles
- How to create a horizontal boxplot in base R?
- How to create a boxplot without frame in base R?
- How to create boxplot for a list object in base R?
- How to create side-by-side boxplot in base R?
- How to create boxplot for multiple categories in base R?
- How to create boxplot in base R without axes labels?
- How to create a boxplot with log of the variable in base R?
- How to create a boxplot in base R without any axes except Y?
- How to hide outliers in base R boxplot?
- How to create boxplot for multiple categories with long names in base R?
- Create histogram with horizontal boxplot on top in base R.
- How to display mean inside boxplot created by using boxplot function in R?
- How to create boxplot in base R with higher width of the box lines?
- How to create transparent boxplot in R?
- How to plot means inside boxplot using ggplot2 in R?