stamp_grid.Rd
Stamp a grid for decoupling annotation from plotting
stamp_grid(color = "turquoise4", fill = "linen", alpha = 0.5)
color | grid color, defaults to 'turquoise4' |
---|---|
fill | overlay color, defaults to 'linen' |
alpha | numeric between 0 and 1, level of transparency for grid layer |
library(ggplot2) ggplot(cars) + aes(x = speed) + aes(y = dist) + geom_point() + facet_wrap(~speed > 15) -> p cowplot::ggdraw(p) + stamp_grid() + # you can comment this guide out later stamp_text_ljust(label = "Over on this side we look at the slow cars." %>% stringr::str_wrap(15), x = .15, y = .8, size = 5) + stamp_segment(x = .35, xend = .35, y = .2, yend = .7, size = .5, linetype = "dashed") + stamp_text_ljust(label = "Over here, fast cars!" %>% stringr::str_wrap(15), x = .6, y = .2, size = 5) + stamp_curve(x = .65, y = .27, xend = .79, yend = .5, curvature = -.2)#> Warning: Ignoring unknown aesthetics: x, y