Basically, I am trying to use R to create a graphic in which I can make rectangles of various lengths at certain locations on a plot's X-axis. So, with some R code using something like ggplot2, I would make a graphic that looks something like this:
---- ----------------- -----------------
....| |--------| |------------------------------| |
---- ----------------- -----------------
Sorry for the stupid ASCII art!
The only ggplot2 function I could find is geom_errorbarh
, but this of coruse just gives horizontal error bars and not boxes. Also, I want the boxes to be filled with color and have labels, if possible. And, I'm not confined to ggplot2, I can use anything within R, I just thought ggplot2 might be the easiest way.
Thanks for any advice!