title: Place a border around different shape varieties in ggplot2 (R)
body: <p>In attempting to place a border around <code>geom_point()</code>s in <code>ggplot2</code>, <a href="https://stackoverflow.com/questions/10437442/place-a-border-around-points">this question</a> was an extremely helpful starting point. I ended up opting for the approach outlined by @joran (the second answer) because it allows me to get smaller outlines (this is preferable since these points will end up being quite small in the final product).</p>
  
  <p>However, I am having trouble employing a slight variation of this technique. I have two different shape varieties to outline and this is causing me some problems. Here is a reproducible example:</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)) +
      geom_line(color = 'gray40') +
      geom_point(aes(shape = id,
                     color = id),
                 size = 3) +
      geom_point(aes(shape = id),
                 color = 'gray70',
                 size = 3,
                 show_guide = FALSE) +
      scale_color_manual(values = c('lightskyblue1', 'lightpink'),
                         labels = c('HQ', 'LQ')) +
      scale_shape_manual(values = c(15, 16, 0, 1),
                         labels = c('HQ', 'LQ')) +
      theme_bw()
  </code></pre>
  
  <p>This ends up giving a plot that looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/N6bvP.png" alt="enter image description here"></p>
  
  <p>I cannot understand why the points become solid gray (this is the color I'd like the border around the blue and pink points to be). Any help in retaining the blue and pink fill with a gray border matching the shape type would be greatly appreciated!</p>
  
  <p>EDIT: In case it was not clear, I know that I can use <code>pch 21-25</code> to achieve a border. However, these borders are too large and their thickness is not modifiable (as far as I know). As a result I am trying to layer two <code>geom_points()</code>s, one filled and the other unfilled, to achieve the appearance of a border. I can sort of accomplish this by layering another set of <code>geom_point()</code>s like this:</p>
  
  <pre><code>plot &lt;- 
      ggplot(df, aes(x = period,
                     y = values,
                     group = id)) +
      geom_line(color = 'gray40') +
      geom_point(aes(shape = id,
                     color = id),
                 size = 3) +
      geom_point(shape = 1,
                 color = 'gray70',
                 size = 3,
                 show_guide = FALSE) +
      scale_color_manual(values = c('lightskyblue1', 'lightpink'),
                         labels = c('HQ', 'LQ')) +
      scale_shape_manual(values = c(15, 16),
                         labels = c('HQ', 'LQ')) +
      theme_bw()
  </code></pre>
  
  <p>The problem here is that each "border" does not match the corresponding shape, and the resulting image looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/karN1.png" alt="enter image description here"></p>