title: Way to overlay an image on each ggplot object in a list using grid.raster?
body: <p>I have a list of ggplot objects that I want to place a logo onto in the same relative position without having to specify new x,y coordinates for when the axes are different.</p>
  
  <p>The application of <code>grid::grid.raster()</code> is exactly how I want it to perform, but I can't sort out how to apply it to objects in my list and not my open graphics device. </p>
  
  <p><code>annotate_custom()</code> &amp; <code>annotate_raster()</code> (as far as I can tell) will require me to set positioning according to the data for each plot which is not ideal.</p>
  
  <pre class="lang-r prettyprint-override"><code>library(magick)
  library(ggplot2)
  library(grid)
  library(purrr)
  
  stock_image &lt;- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
  print(stock_image)
  
  #make a ggplot object for example
  any_ggplot &lt;- qplot(mtcars$hp, mtcars$mpg)
  
  #make a list of them
  plot_list &lt;- rep(list(any_ggplot), 4)
  
  #the goal is to put that image on all of them, and save the new plots in a list.
  
  # I can do it once with grid.raster,
  # And this is the preferred method because the scaling and position is consistent 
  # even if the axes change
  grid::grid.raster(stock_image, x = 0.5, y = 0.5, just = c('left', 'bottom'), width = unit(1.5, 'inches'))
  
  
  # But I can't do it to the list
  new_plot_list &lt;- purrr::map(plot_list, function(x) {
  
    x
    grid::grid.raster(stock_image, x = 0.5, y = 0.5, just = c('left', 'bottom'), width = unit(1.5, 'inches'))
  
  
  })
  
  #Help?
  </code></pre>
  
  <p>Ideally each plot would now have that image overlaid on it. But, currently what is happening is the image is overlaid on the open plot and no list is returned.</p>
  
  <p>I think I need to isolate the graphics device for each one, but I'm not sure, and may not.</p>