Vis1

library(ggplot2)
g <- ggplot(mpg, aes(class))

g + geom_bar(aes(fill = trans))+ scale_fill_discrete(name="Transmission")

Vis2

library(ggplot2)
p <- ggplot(mpg, aes( manufacturer,hwy) )+ labs(x = "Vehicle Manufacturer" , y = "Highway Fuel Efficiency(miles/gallon)")

p + geom_boxplot(notch = FALSE)+coord_flip()+theme_classic()

Vis3

library(ggplot2)
library(ggthemes)
d <- ggplot(diamonds, aes(price ,fill = cut) )+ labs(x = "Diamond Price(USD)" , y = "Density" ,title="Diamond Price Density ")

d+geom_density(alpha=0.15,aes(x=price , color =cut,fill = cut )) +theme(legend.position="top")+ theme_economist()

Vis4

library(ggplot2)
I <- ggplot(iris, aes(Sepal.Length, Petal.Length)) 

I+geom_point() + geom_smooth(method = "lm", se = TRUE) + labs(x="Iris Sepal Length" , y="Iris Petal Length" , title=("Relationship between Petal and Sepal Length")) +theme_minimal()

Vis5

library(ggplot2)

i <- ggplot(iris, aes(Sepal.Length, Petal.Length , colour = Species)) 

i+ geom_point() +
  geom_smooth(se = FALSE, method = "lm") + labs(x="Iris Sepal Length" , y="Iris Petal Length" , title=("Relationship between Petal and Sepal Length"), subtitle=("Species Level Comparison")) + theme(legend.position="bottom")+theme_tufte()