You need to try polygon . This code may be useful:
y98 = aggregate(gcdata$Pause.s. ~ hours, data=gcdata, FUN=q98) y02 = aggregate(gcdata$Pause.s. ~ hours, data=gcdata, FUN=q02) ymax = aggregate(gcdata$Pause.s. ~ hours, data=gcdata, FUN=max) ymin = aggregate(gcdata$Pause.s. ~ hours, data=gcdata, FUN=min) ymean = aggregate(gcdata$Pause.s. ~ hours, data=gcdata, FUN=mean) x = ymean[,1] y1 = cbind(y02[,2], ymean[,2], y98[,2]) y2 = cbind(ymin[,2], ymean[,2], ymax[,2]) plotAreaCI(x,y2, ylim=c(0,2), xlab="time", ylab="variable") plotAreaCI(x,y1, ylim=c(0,2), poly.col="blue", add=TRUE)

or
plotAreaCI(x,y2, ylim=c(0,2), xlab="time", ylab="variable", nice.x = TRUE) plotAreaCI(x,y1, ylim=c(0,2), mean.lwd=2, poly.col="blue", add=TRUE)

where the plotAreaCI function is defined as follows:
plotAreaCI = function(x, y, add=FALSE, nice.x = FALSE, xlim=NULL, ylim=NULL, mean.col="black", mean.lwd=1.5, poly.col="gray", poly.lty=3, xlab=NULL, ylab=NULL, main="", ...) { isFactorX = isClass("factor", x) if(isFactorX) { x.label = x x = as.numeric(x) } if(is.null(xlim)) xlim=range(x, na.rm=TRUE) if(is.null(ylim)) ylim=range(y, na.rm=TRUE) x.pol = c(x, rev(x), x[1]) y.pol = c(y[,1], rev(y[,3]), y[,1][3]) if(!add) { plot.new() plot.window(xlim=xlim, ylim=ylim, ...) if(!nice.x & isFactorX) { axis(1, at=x, labels=x.label) } else { xticks = axTicks(1) if(isFactorX) { xticks = xticks[xticks>=1] axis(1, at=xticks, labels=x.label[xticks]) } else { axis(1) } } axis(2, las=1) box() title(xlab=xlab, ylab=ylab, main=main) } polygon(x.pol, y.pol, col=poly.col, lty=poly.lty) lines(x, y[,2], col=mean.col, lwd=mean.lwd) return(invisible()) }