# NOT RUN {
library(ggplot2)
base_plot <- ggplot(mtcars, aes(x = wt, y = mpg)) +
geom_point() +
facet_wrap(~cyl)
my_annot_call <- make_layer("text",
aes = list(x = 3, y = 30, label = "A label"),
facets = list(cyl = 6),
params = list(col = "red")
)
my_annotation <- eval(my_annot_call)
base_plot + my_annotation
# }
Run the code above in your browser using DataLab