ggplot2

Chart 1st

This is the first plot of Histogram

library("dplyr")
## 
## Attaching package: 'dplyr'

## The following objects are masked from 'package:stats':
## 
##     filter, lag

## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
emp = iris
emp %>% ggplot(aes(x =Petal.Length))+geom_histogram(binwidth = 0.1 , fill="red" , colour = "black")

Chart 2nd

This is the plot of Violin Plot

#Plotting Distributions - Violin plot..
emp %>% ggplot(aes(x =Species , y =Petal.Length)) + geom_violin(colour = "black" , fill="yellow")

Chart 3rd

This is the plot of Box plot

#Plotting Distributions - Boxplots..
emp %>% ggplot(aes(x =Species , y =Petal.Length)) + geom_boxplot(colour = "black" , fill="blue")

Chart 4th

This is the plot of Density Plot

#Plotting Distributions - Density...
emp %>% ggplot(aes(x =Petal.Length , fill =Species))+geom_density(colour = "black" , alpha = 0.5)

Chart 5th

This is the plot of Jitter Plot

#Plotting Distributions - Stripcharts..
emp %>% group_by(Species) %>% sample_n(40) %>% ggplot(aes(x =Species , y =Petal.Length))+geom_jitter(height = 0 , width = 0.3 , size = 10 ,colour="red" , shape="*")

Chart 5th

This is the plot of Column Plot

emp %>% ggplot(aes(x =Petal.Length , y=Species))+geom_col(binwidth = 0.1 , fill="pink" , colour = "black")
## Warning in geom_col(binwidth = 0.1, fill = "pink", colour = "black"): Ignoring
## unknown parameters: `binwidth`