Advertisement
Guest User

Untitled

a guest
Feb 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #' geom_ghazi. Annotate any ggplot2 plot with Benghazi, because it's
  2. #' always about Benghazi
  3. library("ggplot2")
  4. geom_ghazi <- function(gp = grid::gpar(fontsize = 75, fontface = "bold"),
  5. ...) {
  6. annotation_custom(grid::textGrob("BENGHAZI", gp = gp, ...),
  7. xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf)
  8. }
  9. ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point() + geom_ghazi()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement