How to create a horizontal boxplot in base R?

To create a horizontal boxplot in base R, we can set the horizontal argument inside boxplot function to TRUE. For example, if we have a vector called x then the horizontal histogram of that vector can be created by using the command boxplot(x,horizontal=TRUE).

Example1

x

Output

Example2

y

Output

Example3

z

Output

Updated on: 2021-03-06T13:46:26+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements