- 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 display mean in a boxplot with cross sign in base R?
To display mean in a boxplot with cross sign in base R, we can use the points function and pass the mean with pch = 4 that represents a star, also we can change the color to highlight the mean using col argument and the size of the start can be changed using lwd argument as shown in the below examples.
Example
x<-sample(0:9,100,replace=TRUE) boxplot(x)
Output
Example
points(mean(x),col="blue",pch=4,lwd=6)
Output
- Related Articles
- How to display outliers in boxplot with different shape in base R?
- How to display mean with underline in base R plot?
- How to display mean inside boxplot created by using boxplot function in R?
- How to display star for significance in base R boxplot?
- How to create a plot with cross sign in R?
- How to display square root sign in base R plot?
- How to display star/asterisk sign (*) inside a base R plot?
- How to create a horizontal boxplot in base R?
- How to hide outliers in base R boxplot?
- How to create a boxplot with log of the variable in base R?
- How to create a rectangle inside boxplot in base R?
- How to create a boxplot without frame in base R?
- How to fill the outliers with different color in base R boxplot?
- How to create boxplot for a list object in base R?
- How to create boxplot for multiple categories with long names in base R?

Advertisements