t<-2
c<-.4
a<-0; b<-10;
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-4; #try also nx<-40; ny<-10 or nx<-1000; ny<-10;
set.seed(1)
xr<-range(a,b)
xf<-(xr[2]-xr[1])*.1
Xp<-runif(nx,a-xf,b+xf)
Yp<-runif(ny,a,b)
plotCSregs1D(Xp,Yp,t,c,xlab="",ylab="")
plotCSregs1D(Xp,Yp+10,t,c,xlab="",ylab="")
Run the code above in your browser using DataLab