Creating Scatter Plot by Groups in R - HKBUPhonLab.Ep.49

Опубликовано: 07 Август 2026
на канале: HKBU Phonology Laboratory
405
7

HKBU Phonology Lab
http://arts.hkbu.edu.hk/phonlab/index...

Information about the R package “ggplot2”.
https://cran.r-project.org/web/packag...

Shapes and specific numbers.
http://www.sthda.com/english/wiki/ggp...

Sample r code:
install.packages("ggplot2")

library(ggplot2)

ggplot(data1, aes(x= Quiz, y= Test, color= Gender)) + geom_point(shape=19)

ggplot(data1, aes(x= Quiz, y= Test, color= Gender)) + geom_point(shape=19, size=3)

ggplot(data1, aes(x= Quiz, y= Test, color= Gender)) + geom_point(shape=19, size=3) + geom_smooth(method=lm)

ggplot(data1, aes(x= Quiz, y= Test, color= Gender)) + geom_point(shape=19, size=3) + geom_smooth(method=lm , se= FALSE)

Thanks to the HKBU Faculty of Arts for the support in the video making.
Lab director: Mingxing Li
Technical assistant: Vesper Liu
Director and camera: Kennix Chow
Copy editing: Tsui Ying Ho