p <- ggplot(mpg, aes(displ, hwy)) +
geom_point() +
facet_grid(year ~ drv)
anno <- annotate("text", x = 3, y = 40, label = "My text")
# Target specific panels
p + at_panel(anno, PANEL %in% c(2, 4))
# Target a variable
p + at_panel(anno, drv == "f")
# Or combine variable with position
p + at_panel(anno, drv == "f" & ROW == 2)
Run the code above in your browser using DataLab