Created
February 25, 2017 04:40
-
-
Save jrnold/a788cf0f3b3084ae6fdc29a108856cb3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' 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