Skip to content

Instantly share code, notes, and snippets.

@jrnold
Created February 25, 2017 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrnold/a788cf0f3b3084ae6fdc29a108856cb3 to your computer and use it in GitHub Desktop.
Save jrnold/a788cf0f3b3084ae6fdc29a108856cb3 to your computer and use it in GitHub Desktop.
#' geom_ghazi. Annotate any ggplot2 plot with Benghazi, because it's
#' always about Benghazi
library("ggplot2")
geom_ghazi <- function(gp = grid::gpar(fontsize = 75, fontface = "bold"),
...) {
annotation_custom(grid::textGrob("BENGHAZI", gp = gp, ...),
xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf)
}
ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point() + geom_ghazi()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment