Homework 2 ) Q2
library(ggplot2)
ggplot(mpg,aes(hwy,fill = drv)) +
g1 <- geom_histogram(binwidth=1,alpha=0.5) +
theme_minimal()
2.1 Final Output
g1 +
g2 <- ylim(0,30) +
facet_grid(rows = vars(drv)) +
labs(title="Histogram using facet_grid()",subtitle = "Histogram of Highway Mile Per Gallon",caption = "Source: mpg")
g2