- 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 color of box of boxplot in base R?
To change the color of box of boxplot in base R, we can use col argument inside boxplot function.
For example, if we have a vector called V and we want to create a boxplot of V without red colored box then we can use the following command −
boxplot(x,col="red")
Example
To change the color of box of boxplot in base R, use the code given below −
x<-rnorm(100) boxplot(x)
Output
If you execute the above given code, it generates the following output −
To change the color of box of boxplot in base R, use the code given below −
x<-rnorm(100) boxplot(x,col="blue")
Outpu
If you execute the above given code, it generates the following output −
To change the color of box of boxplot in base R, use the code given below −
x<-rnorm(100) boxplot(x,col="red")
Output
If you execute the above given code, it generates the following output −
- Related Articles
- How to change the color of outliers in base R boxplot?\n
- How to change the border color of box of a base R plot?
- How to create boxplot in base R with higher width of the box lines?
- How to change the font size of main title of boxplot in base R?
- How to change the color of bars in base R barplot?
- How to fill the outliers with different color in base R boxplot?
- How to change the whisker line type in base R boxplot?
- How to change the border line type in base R boxplot?
- How to change the background color of legend in base R plot?
- How to change the background color of base R plot region?
- How to change the axis color in base R plot?
- How to change the axis ticks color in base R plot?
- How to change the color of the alert box in JavaScript?
- How to change the color of the Check box in Android?
- How to hide outliers in base R boxplot?

Advertisements