p1 <- airquality |>ggplot(aes(x=Temp, fill=Month)) +geom_histogram(position="identity")+scale_fill_discrete(name ="Month", labels =c("May", "June","July", "August", "September")) +labs(x ="Monthly Temperatures from May - Sept", y ="Frequency of Temps",title ="Histogram of Monthly Temperatures from May - Sept, 1973",caption ="New York State Department of Conservation and the National Weather Service") #provide the data source
P2
p2 <- airquality |>ggplot(aes(x=Temp, fill=Month)) +geom_histogram(position="identity", alpha=0.5, binwidth =5, color ="white")+scale_fill_discrete(name ="Month", labels =c("May", "June","July", "August", "September")) +labs(x ="Monthly Temperatures from May - Sept", y ="Frequency of Temps",title ="Histogram of Monthly Temperatures from May - Sept, 1973",caption ="New York State Department of Conservation and the National Weather Service")
P3
p3 <- airquality |>ggplot(aes(Month, Temp, fill = Month)) +labs(x ="Months from May through September", y ="Temperatures", title ="Side-by-Side Boxplot of Monthly Temperatures",caption ="New York State Department of Conservation and the National Weather Service") +geom_boxplot() +scale_fill_discrete(name ="Month", labels =c("May", "June","July", "August", "September"))
P4
p4 <- airquality |>ggplot(aes(Month, Temp, fill = Month)) +labs(x ="Monthly Temperatures", y ="Temperatures", title ="Side-by-Side Boxplot of Monthly Temperatures",caption ="New York State Department of Conservation and the National Weather Service") +geom_boxplot()+scale_fill_grey(name ="Month", labels =c("May", "June","July", "August", "September"))
P5
p5 <- airquality |>ggplot(aes(x=Temp, fill=Month)) +geom_histogram(x ="Monthly Temps", y ="Months", title ="Side-by-Side Boxplot of temperatures through the months",caption ="National Weather Service") +geom_boxplot()+scale_fill_grey(name ="Month", labels =c("May", "June","July", "August", "September"))
Warning in geom_histogram(x = "Monthly Temps", y = "Months", title =
"Side-by-Side Boxplot of temperatures through the months", : Ignoring unknown
parameters: `title` and `caption`
Essay
For my plot 5, I used the same formats as the other 4 plots. The change I made to plot 5 was making x axis the temp and fill for the months. I also changed the x to temperatures and changed y to the months out of curiosity to see the graph it makes with the variables flipped. I also changed the caption to something different from the New York weather service from plot 4 to just the National weather service. The only thing I kept the same is filling the grey scale on all the plots and using a geometric box plot to display all the data for the months listed. I also tried to keep the overall format the same to avoid confusion and stray errors.