Does this thread help?
https://stat.ethz.ch/pipermail/r-help/2006-February/086874.html
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Thomas Hoffmann
> Sent: Wednesday, February 22, 2006 2:17 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] shaded timeseries plot
>
>
> Dear list members,
>
> I would like to plot a time series, with grayshaded background in time
> phases were the value of the timeseries exceeds the mean value. For
> example, if the temperature from 1995-1998 exeeds the mean value between
> 1980 and 2005, the background in the plot from 1995-1998 shall be shaded.
>
> Can anybody help me?
> Thanks
> Thomas H.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>