I have some problem printing out two plots in one graph although I have used the option 'add=TRUE' Plz check out is there any point to fix out.
plot(X1[Y==0], type="p",xlim=c(0,8),ylim=c(0,40),col=4,pch=1,ylab="X1")
plot(X1[Y==1], add=TRUE, type="p",xlim=c(0,8),ylim=c(0,40),col=2, pch=2, ylab="X1")