R | plotly | Scatter Plot - 산점도
·
R/plotly
Scatter Plot , 산점도는 두 개의 연속형(continuous) 데이터의 상관관계를 파악하기에 매우 유용한 그래프이다. plotly 패키지를 이용해 산점도를 그리기 위해선 add_trace() 또는 add_markers() 함수를 사용하면 된다. 00. 패키지 로드 및 데이터 불러오기 ## 패키지 로드 library(dplyr) library(plotly) library(RColorBrewer) ### 한글 폰트 설정 library(showtext) font_add_google("Nanum Gothic", "nanumgothic") ## 데이터 불러오기 : 크론병 데이터 df % layout(title = "weight에 따른 BMI의 변화", font=list(family ='nanumgoth..
R | ggplot2 | Scatter Plot(산점도)
·
R/ggplot2
Scatter Plot , 산점도는 두 개의 연속형(continuous) 데이터의 상관관계를 파악하기에 매우 유용한 그래프이다. ggplot2 패키지에서는 Scatter Plot을 그리기 위한 geom_point() 함수를 제공한다. geom_point( mapping = NULL, data = NULL, stat = "identity", position = "identity", ..., na.rm = FALSE, show.legend = NA, inherit.aes = TRUE ) · 주요 Argument Argument 사용 방법 설명 stroke point의 외곽 라인의 두께 지정 1) stroke = 1 fill point의 채우기 색상 1) fill = "컬러코드" 1) mapping 밖에 사용..