I would like to draw a box at the bottom of each panel, where each panel may have different y-ranges. The box should always be from 3 to 7 on the x-axis and from t
You could do,
g <- rectGrob(y=0,height = unit(0.05, "npc"), vjust=0, gp=gpar(fill="black")) p + annotation_custom(g, xmin=3, xmax=7, ymin=-Inf, ymax=Inf)