Hoping someone can point me in the right direction... I want to identify different groups on a QQ plot using ggplot... which appears to be easily done in base/stats qqnorm .eg.
set.seed(1967)
test <- as.data.frame(cbind( x= rnorm(100,5,2),y=c(rep(1,30),rep(2,70))))
qqnorm(test$x,col=test$y)
but ggplot gives me this:
ggplot(test, aes(sample=x,col=as.factor(y))) + geom_qq()
How do i achieve the qqnorm plot with ggplot? I tried searching here... found similar, but no concise answer... surely I'm missing some trivial switch thing?