- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

To fill the outliers in boxplot with different color in base R, we can use outpch argument for the shape and outbg argument for colors.

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

boxplot(X,outpch=21,outbg="blue")

To fill the outliers in boxplot with different color in base R, use the code given below −

x<-c(-4,rnorm(5),3) boxplot(x)

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

To fill the outliers in boxplot with different color in base R, use the code given below −

x<-c(-4,rnorm(5),3) boxplot(x,outpch=21,outbg="blue")

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

- Related Questions & Answers
- How to display outliers in boxplot with different shape in base R?
- How to change the color of outliers in base R boxplot?\n
- How to hide outliers in base R boxplot?
- How to change the color of box of boxplot in base R?
- How to extract the outliers of a boxplot in R?
- How to highlight outliers in a boxplot in R?
- How to create a boxplot with outliers of larger size in R?
- How to set the range for boxplot in base R?
- How to create a boxplot with log of the variable in base R?
- How to create a horizontal boxplot in base R?
- How to change the border line type in base R boxplot?
- How to change the whisker line type in base R boxplot?
- How to create boxplot in base R with higher width of the box lines?
- How to display legend in base R with different colors?
- How to display mean in a boxplot with cross sign in base R?

Advertisements