I want to add an annotation outside the plotting area in a faceted ggplot. I can get the annotation that I want, but it\'s repeated for each facet. How can I get this annota
It's in fact very easy, just have a vector of labels, where the ones you don't want to plot are the empty string ""
.
library("ggplot2")
ggplot(mtcars, aes(x = hp, y = mpg)) +
geom_point() +
annotate("text", x = -20, y = 36, label = c("XX", "", "")) +
facet_grid(.~cyl ) +
coord_cartesian(xlim = c(50, 350), ylim = c(10, 35), clip = "off")