색상을 신중하게 사용하기

R로 배우는 plotly 인터랙티브 데이터 시각화

Adam Loy

Statistician, Carleton College

R로 배우는 plotly 인터랙티브 데이터 시각화

세 번째 변수 추가

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers()
R로 배우는 plotly 인터랙티브 데이터 시각화

정량 변수 추가

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Color) %>%
  add_markers()
R로 배우는 plotly 인터랙티브 데이터 시각화

RColorBrewer 팔레트

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers(colors = "Dark2")
R로 배우는 plotly 인터랙티브 데이터 시각화

수동 팔레트

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers(colors = c("orange", "black", "skyblue"))
R로 배우는 plotly 인터랙티브 데이터 시각화

연습해 봅시다!

R로 배우는 plotly 인터랙티브 데이터 시각화

Preparing Video For Download...