I am looking to save this ggplot2 chart below using the ggsave function after I've added a logo to it
# Load packages and dataset
library(ggplot2)
library(magick)
data(mpg, package="ggplot2")
# Load a logo from Github
logo <- image_read("https://jeroen.github.io/images/frink.png")
# Plot Code
ggplot(mpg, aes(cty, hwy)) +
geom_count(col="tomato3", show.legend=F)
# Add logo to plot
grid::grid.raster(logo, x = 0.04, y = 0.03, just = c('left', 'bottom'), width = unit(1, 'inches'))
However, when I try to save the plot using ggsave, it saves the plot without the logo. Any way to overcome this and have the logo appear in the saved image?
ggsave('Plot.tiff',width =10,height = 6, device = 'tiff', dpi = 700)
