title: Using override.aes() in ggplot2 with layered symbols (R)
body: <p>I recently <a href="https://stackoverflow.com/questions/29129705/place-a-border-around-different-shape-varieties-in-ggplot2-r">asked a question</a> here which allowed me to add borders to <code>geom_point()</code>s in <code>ggplot2</code> with customizable colors and thickness. Admittedly, it's a bit of a hack and I'm now having some trouble which may be a result of this. The borders are generated by layering two <code>geom_point()</code>s, one of which is the color of the border that I want and which is slightly larger than the <code>geom_point()</code> which provides the "fill". A reproducible example here:</p>
  
  <pre><code>require('ggplot2')
  
  values &lt;- rnorm(n = 10, mean = 1, sd = 0.5) + c(1:10)
  
  df &lt;- data.frame(id = rep(c('hq', 'lq'), each = 5),
                   values = values,
                   period = rep(c(1:5), 2))
  
  plot &lt;- 
      ggplot(df, aes(x = period,
                     y = values,
                     group = id,
                     shape = id,
                     color = id)) +
      geom_line(color = 'gray40') +
      geom_point(color = 'gray24',
                 size = 4) +
      geom_point(size = 3) +
      guides(shape = guide_legend(override.aes = list(size = 5))) +
      scale_color_manual(values = c('lightskyblue1', 'lightpink'),
                         labels = c('HQ', 'LQ')) +
      scale_shape_manual(values = c(15, 17, 0, 2),
                         labels = c('HQ', 'LQ')) +
      theme_bw()
  </code></pre>
  
  <p>Because I would like the legend symbols to be larger than the plot symbols, I've used <code>override.aes()</code>. However, this means that the "borders" I've created do not appear in the legend:</p>
  
  <p><img src="https://i.stack.imgur.com/LLwOx.png" alt="enter image description here"></p>
  
  <p>Is there some way to give multiple <code>size</code> arguments to <code>override.aes()</code> so that the layering I've used in the plot is left intact in the legend (i.e. the legend symbols also contain the "borders")?</p>