library(ISLR) library(ggplot2) head(Auto) # Q1 ggplot(Auto, aes(x = cylinders)) + geom_bar(aes(fill=factor(cylinders))) + xlab("") + ylab("") + ggtitle("BARCHART") # Q2 ggplot(Auto, aes(x = weight)) + geom_histogram(color = 'black', fill= 'blue') + xlab("") + ylab("") + ggtitle("HISTOGRAM") # Q3 ggplot(Auto, aes(x = origin, y = weight)) + geom_boxplot(color = 'black', fill= 'orange') + xlab("") + ylab("")+ ggtitle("BOXPLOT") # Q4 ggplot(Auto, aes(x =acceleration)) + stat_ecdf(color = 'red') + xlab("") + ylab("")+ ggtitle("ECDF")