Closed cfelletter closed 4 years ago
here is what I'm using you might want to tweak it
add_logo_horiz <- function(gg) { # arrange all 3 plots together gg_grob <- ggplotGrob(gg) # logo ------------------------------- logo <- imager::load.image("code/logo/BofR-horiz-cmyk.png") logo <- grid::rasterGrob(logo, interpolate = TRUE) l2 <- ggplot() + geom_blank() + theme_minimal() + annotation_custom(logo) gg <- grid.arrange(arrangeGrob( gg_grob, nullGrob(), l2, layout_matrix = matrix(c(1,1,2,3), ncol = 2, byrow = TRUE), heights = c(.9, .1), widths = c(.7, .3) #bottom = cap_text )) gg } add_logo_shield <- function(gg) { # arrange all 3 plots together gg_grob <- ggplotGrob(gg) # logo ------------------------------- # logo <- imager::load.image("code/logo/BofR-vert-cmyk.png") logo <- imager::load.image("code/logo/seal-white.png") #saved from the BOR page footer # logo <- imager::load.image("code/logo/BofR-shield-cmyk.png") #not as crisp logo <- grid::rasterGrob(logo, interpolate = TRUE) l2 <- ggplot() + geom_blank() + theme_minimal() + annotation_custom(logo) gg <- grid.arrange(arrangeGrob( gg_grob, nullGrob(), l2, layout_matrix = matrix(c(1,1,2,3), ncol = 2, byrow = TRUE), heights = c(.9, .1), widths = c(.9, .1) #bottom = cap_text )) gg }
here is what I'm using you might want to tweak it