การใช้สีอย่างมีประสิทธิภาพ

การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

Adam Loy

Statistician, Carleton College

การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

การเพิ่มตัวแปรที่สาม

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers()
การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

การเพิ่มตัวแปรเชิงปริมาณ

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Color) %>%
  add_markers()
การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

พาเลตต์ RColorBrewer

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers(colors = "Dark2")
การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

พาเลตต์แบบกำหนดเอง

wine %>%
  plot_ly(x = ~Flavanoids, y = ~Alcohol, color = ~Type) %>%
  add_markers(colors = c("orange", "black", "skyblue"))
การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

มาฝึกกันเถอะ!

การสร้างกราฟิกแบบโต้ตอบด้วย plotly ใน R

Preparing Video For Download...