options(error=recover) set.seed(0xdadada) ##--------------------------------------------------------------- ## bag of balls ##--------------------------------------------------------------- n = 40 p = 0.1 cols = c("#0000ffd0", "#ff0000d0") thePlot = function(..., cex=2) plot(..., xaxt="n", yaxt="n", bty="n", xlab="", ylab="", pch=16, cex=cex) x = rep(seq(-1, 1, length.out=n), each=n) y = rep(seq(-1, 1, length.out=n), times=n) wh = which((x*x+y*y)<0.6^2) pdf(file="110629-brixen-deseq-huber-bag.pdf", width=3, height=3) par(mai=rep(0,4)) thePlot(x=x[wh], y=y[wh], col=ifelse(pp), cols[1], cols[2]), ylim=c(0.5,nr+.5), cex=c(3, 0.75)[s]) dev.off() } ##--------------------------------------------------------------- ## Sample from 100 ##---------------------------------------------------------------