Here is the Splus code I used to create a power contour plot that emulates the code used in SAS. Note how the (x,y) coordinates have to be expanded (to emulate looping) and then listed as grid values when contour plotting. The power function has to be packed into a matrix for the contour command--ordering of the coordinates is critical here-- you'll be able to tell if you got it right when you see the contour plot. s02_rep(seq(1,5),rep(15,5)) n_rep(seq(2,16),5) ncvec_n*s02 a_5 nma_n*a-a power_1-pf(qf(.95,a-1,nma),a-1,nma,ncvec) contour(seq(2,16),seq(1,5),matrix(power,ncol=5),xlab="Sample Size", ylab="Effect")