Använda attribut

Introduktion till datavisualisering med ggplot2

Rick Scavetta

Founder, Scavetta Academy

Estetik? Attribut!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(color = "red")
Typ Egenskap
Färg "red"

Ange attribut i geom_*().

Attributet color är satt till "red".

Introduktion till datavisualisering med ggplot2

Estetik? Attribut!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(size = 10)
Typ Egenskap
Storlek 4

Introduktion till datavisualisering med ggplot2

Estetik? Attribut!

ggplot(iris, aes(x = Sepal.Length, 
                 y = Sepal.Width)) + 
  geom_point(shape = 4)
Typ Egenskap
Form 4

Introduktion till datavisualisering med ggplot2

Nu kör vi en övning!

Introduktion till datavisualisering med ggplot2

Preparing Video For Download...