t<-1.5
c<-.4
a<-0; b<-10; int<-c(a,b)
#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)
Xlim=range(Xp,Yp)
Ylim=c(-.2,.2)
jit<-.1
plotCSarcs1D(Xp,Yp,t,c,jit,xlab="",ylab="",xlim=Xlim,ylim=Ylim)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=1.5,c=.3,jit,main="t=1.5, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=2,c=.3,jit,main="t=2, c=.3",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=1.5,c=.5,jit,main="t=1.5, c=.5",xlab="",ylab="",centers=TRUE)
set.seed(1)
plotCSarcs1D(Xp,Yp,t=2,c=.5,jit,main="t=2, c=.5",xlab="",ylab="",centers=TRUE)
Run the code above in your browser using DataLab