[R] how to draw multiple vertical bands

Marsh Feldman MarshFeldman at cox.net
Mon Apr 19 20:59:15 CEST 2010


On 04/15/2010 12:36 AM, senne wrote:

> >  hi R gurus
> >
> >  I saw some graphs with vertical band like this one:
> >
> >  http://pragcap.com/wp-content/uploads/2010/04/GS.png
> >
> >  how to draw the blue band in R, can't find any clue to do this,any ideas?
>    

See the source code for nber.xy and nberShade.ggplot in the "tis" 
package by Jeff Hallman. They both do what you want.

I'm working on something similar. Besides drawing the bands, my version 
will also vary heights optionally (rather than have bands stretching the 
entire height of the graph) and use ggplot2.

     Marsh Feldman



More information about the R-help mailing list