require("ggplot2")
ggp <- ggplot(aes(x=date, y=100*unemploy/pop), data=economics)
nberShade( ggp ) + xlim(as.Date("1967-01-01"), Sys.Date()) +
opts(legend.position="none") + geom_line() + theme_bw()
nberShade( ggp, fill = "yellow", color = "pink",
xrange = c("1969-01-01", "2008-02-01"), openShade = FALSE) +
opts(legend.position="none") + geom_line(size=1) + theme_bw()
Run the code above in your browser using DataLab