library(ggplot2)
data("airquality")
ggplot(airquality, aes(x = Wind, y = Ozone)) +
geom_point(color = "blue", size = 2) +
labs(title = "바람 vs 오존", x = "바람 (mph)", y = "오존존 (ppb)") +
theme_minimal()
## Warning: Removed 37 rows containing missing values or values outside the scale range
## (`geom_point()`).
ggplot(airquality, aes(x = factor(Month), y = Ozone)) +
geom_boxplot(fill = "orange") +
labs(title = "월별 오존 수치", x = "월", y = "오존존 (ppb)") +
theme_minimal()
## Warning: Removed 37 rows containing non-finite outside the scale range
## (`stat_boxplot()`).
ggplot(airquality, aes(x = Ozone)) +
geom_histogram(binwidth = 5, fill = "green", color = "black") +
labs(title = "오존 농도 분포", x = "오존 (ppb)", y = "빈도도") +
theme_minimal()
## Warning: Removed 37 rows containing non-finite outside the scale range
## (`stat_bin()`).
산점도 그래프: 바람의 속도와 오존 농도 간의 관계를 나타낸다. 바람의 속도가 증가할수록 오존의 농도는 줄어드는 것을 볼수 있다.
상자 그림: 월별 오존 농도의 분포를 보여준다. 5, 6, 9월의 오존 분포도는 낮은 것으로 보인다.
히스토그램: 오존 농도의 분포를 나타낸다. 대다수의 오존 농도는 낮은 값에 분포한다.