使用屬性

ggplot2 資料視覺化入門

Rick Scavetta

Founder, Scavetta Academy

不是 Aesthetic,是屬性!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(color = "red")
Type Property
Color "red"

geom_*() 中設定屬性。

color 屬性設為 "red"

ggplot2 資料視覺化入門

不是 Aesthetic,是屬性!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(size = 10)
Type Property
Size 4

ggplot2 資料視覺化入門

不是 Aesthetic,是屬性!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(shape = 4)
Type Property
Shape 4

ggplot2 資料視覺化入門

一起來練習吧!

ggplot2 資料視覺化入門

Preparing Video For Download...