set.seed(123)
library(data.table)
library(ggplot2)
dat=data.table(data.frame(a=rnorm(12),b=rnorm(12),c=rep(c(1,2),6),d=rep(c(1,2,3,4),3)))
ggplot(dat,aes(a,c,colour=d)) + geom_point() # line 1
ggplot(dat,aes(a,c,shape=d)) + geom_point() # line 2
Why is line 1 working but not line 2 ? Isn't it just a difference of how the plots are lookink ?
Thank you