- 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 create transparent boxplot in R?
Be default, the boxplot created in base R or by using ggplot2 are not transparent in nature. If we want to create a transparent boxplot then we can use bwplot function from lattice package.
For Example, if we have a vector called X then we can create transparent boxplot of X by using the below command −
bwplot(x)
Example 1
To create transparent boxplot use the snippet given below −
library(lattice) bwplot(rnorm(1000))
Output
If you execute the above given snippet, it generates the following Output −
Example 2
To create transparent boxplot add the following code to the above snippet −
library(lattice) bwplot(rpois(1000,5))
Output
If you execute all the above given snippets as a single program, it generates the following Output −
Example 3
To create transparent boxplot add the following code to the above snippet −
library(lattice) bwplot(sample(1:100,50000,replace=TRUE))
Output
If you execute all the above given snippets as a single program, it generates the following Output −
- Related Articles
- How to create a horizontal boxplot in base R?
- How to create boxplot for matrix columns in R?
- How to create boxplot of grouped data in R?
- How to create a transparent histogram using ggplot2 in R?
- How to create a transparent polygon using ggplot2 in R?
- How to create transparent bar plot using ggplot2 in R?
- How to create side-by-side boxplot in base R?
- How to create boxplot for multiple categories in base R?
- How to create boxplot in base R without axes labels?
- How to create a boxplot without frame in base R?
- How to create boxplot using ggplot2 without whiskers in R?
- How to create a rectangle inside boxplot in base R?
- How to create boxplot using mean and standard deviation in R?
- How to create boxplot for a list object in base R?
- How to create boxplot for list elements using ggplot2 in R?
