- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
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 change the border line type in base R boxplot?
The default boxplot in R has straight border line type that display end point(s) excluding outliers. To change these border lines from a boxplot, we can use staplelty argument.
For Example, if we have a vector called X then we can create the boxplot of X with different border line type by using the command boxplot(X,staplelty=15). The argument can take different values. Check out the below Examples to understand how it works.
Example
Consider the below vector −
x<-rnorm(15)
To create a boxplot of x, add the following code to the above snippet −
x<-rnorm(15) boxplot(x)
Output
If you execute the above given snippet, it generates the following Output −
To create a boxplot of x with different border lines, add the following code to the above snippet −
x<-rnorm(15) boxplot(x,staplelty=2)
Output
If you execute all the above given snippets as a single program, it generates the following Output −
Add the following code to the above snippet −
x<-rnorm(15) boxplot(x,staplelty=15)
Output
If you execute all the above given snippets as a single program, it generates the following Output −
- Related Articles
- How to change the whisker line type in base R boxplot?
- How to change the color of outliers in base R boxplot?\n
- How to change the color of box of boxplot in base R?
- How to add a horizontal line in a boxplot created in base R?
- How to change the font size of main title of boxplot in base R?
- How to hide outliers in base R boxplot?
- How to change the border color of box of a base R plot?
- How to set the range for boxplot in base R?
- How to create a horizontal boxplot 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 without frame in base R?
- How to display star for significance in base R boxplot?
- How to create a rectangle inside boxplot in base R?
