I'd like to set the border color of a ggplot that I'm printing to a powerpoint using officer
(not the plot.border
element of the ggplot object, but the actual border line color of the object in Powerpoint).
I cannot figure out how to do it through the officer API!
For example, in this reproducible code, I'd like the plot object to have a "red" border - how do I do that? Thank you!
library(officer)
library(magrittr)
library(ggplot2)
p <- ggplot(data.frame(x = seq(10), y = rnorm(10)), aes(x, y)) + geom_col()
my_pres <- read_pptx() %>%
add_slide() %>%
ph_with(value = p, location = ph_location_type(type = "body"))
print(my_pres, "~/Desktop/new_example.pptx")