function(PDF=F){ m=8 n=8 if(PDF==T) pdf(file="EDFpainEx6.pdf",width=11) x=c(3.1,3.3,4.2,4.5,4.7,4.9,5.8,6.8) y=c(0.0,2.1,2.3,2.5,2.8,4.4,4.8,6.6) mx=min(c(x,y)) Mx=max(c(x,y)) plot.stepfun(stepfun(x,c(0,(1:n)/n)),xlab="x", ylab=expression(F[m](x)~" and "~G[n](x)),cex=.7,pch=16 ,axes=F,main="",xlim=c(mx,Mx)) axis(1) axis(2) abline(h=c(0,1),lty=2,col="grey") points(x,rep(-.01,n),pch=16,col="green",cex=.7) points(y,rep(-.02,m),pch=16,col="orange",cex=.7) for(i in 1:n){ segments(x[i],-.01,x[i],i/n,lty=2,col="green") } text(mx,.9,paste("m =",m,", n =",n),adj=0) text(4.5,.3,expression(G[n](x))) text(2,.4,expression(F[m](x)),col="blue") out=stepfun(y,c(0,(1:m)/m)) plot(out,add=T,cex=.7,col.hor="blue",col.vert="blue",pch=16) if(PDF==T) dev.off() }