# R function to graph a dotplot # # dotplot = function(x,xlim=NULL,ylim=NULL,xlab=NULL,tol=1e-08) { y = rep(1,length(x)) sx = sort(x) dx = diff(sx) maxHt = 1 ht = 1 dht= 0.5 for(i in 2:length(sx)) { if(abs(dx[i-1]) maxHt) maxHt = ht } if (length(ylim)==0){ylim=c(0.2,maxHt+1)} if (length(xlab)==0){xlab=""} if (length(xlim)==0){xlim=c(sx[1],sx[length(sx)])} plot(x,y,type="n",axes=F,xlab=xlab,ylab="",xlim=xlim,ylim=ylim) axis(1,pretty(x)) points(sx[1],1,pch=16) ht = 1 for(i in 2:length(sx)) { if(abs(dx[i-1])