
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
How to show values in boxplot in R?
The main values in a boxplot are minimum, first quartile, median, third quartile, and the maximum, and this group of values is also called five-number summary. Therefore, if we want to show values in boxplot then we can use text function and provide the five-number summary and labels with fivenum function as shown in the below examples.
Example1
x<-sample(0:9,500,replace=TRUE) boxplot(x,horizontal=TRUE) text(x=fivenum(x),labels=fivenum(x),y=1.25)
Output
Example2
y<-rpois(5000,10) boxplot(y,horizontal=TRUE) text(x=fivenum(y),labels=fivenum(y),y=1.25)
Output
Advertisements