-
Marginal Histogram / BoxplotR 2017. 10. 22. 20:02
install.packages("ggplot2")
install.packages("ggExtra")
library(ggplot2)
library(ggExtra)# graphic layer 초기화
theme_set(theme_bw())# 산점도 작성하기
g <- ggplot2::ggplot(data = cars, aes(x = speed, y = dist)) +
geom_count() +
geom_smooth(method = "lm", se = FALSE)# Marginal Histogram
ggExtra::ggMarginal(g, type = "histogram", fill = "transparent")
# Marginal Boxplot
ggExtra::ggMarginal(g, type = "boxplot", fill = "transparent")'R' 카테고리의 다른 글
ggplot2로 상자그림 작성하기 (0) 2017.10.27 ggplot2의 Layers (0) 2017.10.27 ggplot2 패키지로 산점도 작성하기 (0) 2017.10.22 ggplot() 함수로 산점도 작성하기 (0) 2017.10.21 R데이터를 엑셀(excel) 데이터로 저장하기 (0) 2017.09.25