- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- 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 display outliers in boxplot with different shape in base R?

To display outliers in boxplot with different shape in base R, we can use outpch argument in boxplot.

For example, if we have a vector called X that contains some outliers then we can create a boxplot of X with different shape of outliers by using the below given command −

boxplot(X,outpch=17)

## Example

To display outliers in boxplot with different shape in base R, use the code given below −

x<-c(-20,rpois(10,5),20) boxplot(x)

## Output

If you execute the above given code, it generates the following output −

To display outliers in boxplot with different shape in base R, use the code given below −

x<-c(-20,rpois(10,5),20) boxplot(x,outpch=17)

## Output

If you execute the above given code, it generates the following output: −

To display outliers in boxplot with different shape in base R, use the code given below −

x<-c(-20,rpois(10,5),20) boxplot(x,outpch=15)

## Output

If you execute the above given code, it generates the following output −

- Related Articles
- How to fill the outliers with different color in base R boxplot?
- How to hide outliers in base R boxplot?
- How to change the color of outliers in base R boxplot?\n
- How to highlight outliers in a boxplot in R?
- How to display mean in a boxplot with cross sign in base R?
- How to display star for significance in base R boxplot?
- How to create a boxplot with outliers of larger size in R?
- How to display legend in base R with different colors?
- How to extract the outliers of a boxplot in R?
- How to display upper and lower quartiles through different line in a boxplot in R?
- How to create a horizontal boxplot in base R?
- How to create boxplot for multiple categories with long names in base R?
- How to create a boxplot with log of the variable in base R?
- How to display mean inside boxplot created by using boxplot function in R?
- How to create side-by-side boxplot in base R?