df <- iris
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.5.3
library(plotly)
## Warning: package 'plotly' was built under R version 3.5.3
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(gridExtra)
## Warning: package 'gridExtra' was built under R version 3.5.3
p1 <- ggplot(df,aes(x = Sepal.Length)) +
geom_histogram(colour="black", fill="red", binwidth=2) +
labs(title="Histogram Of Sepal.Length",x="Sepal.Length",y="Frequency Count")
print(p1)

p2 <- ggplot(df,aes(x = Sepal.Length,y = Sepal.Width)) +
geom_point(shape=19) +
geom_line(linetype=1,col = "red")+
labs(title = "Trend of sepal lenghth and sepal width",x = "Sepal.Length",y = "Sepal.Width")
print(p2)

p3 <- ggplot(df,aes(x = Species))+
geom_bar(stat = "count",fill = c("red","blue","green"))+
labs(title = "Frequency distribution for species")+
labs(x = "Species")+
labs(y = "Frequency")
print(p3)
