title: Force ggplot2 to apply a separate legend for each geom
body: <p>In the chart below, the triangles mapped using <code>geom_point</code> are both in the same legend. Essentially, I would like each <code>geom_</code> to have their own separate legend instead. How would I go about doing so?</p>
  
  <p><a href="https://i.stack.imgur.com/nBzQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nBzQw.png" alt="enter image description here"></a></p>
  
  <p>Here's my code for reproducibility:</p>
  
  <pre><code>mydf &lt;- data.frame(year = c(rep(2000, 3), rep(2002, 3), rep(2004, 3), rep(2006, 3), rep(2008, 3), rep(2010, 3), rep(2012, 3), rep(2014, 3), rep(2016, 3)),
                   answer = rep(c("A great deal", "Hardly any", "Only some"), 9),
                   result = c(0.3015940, 0.1399303, 0.5584757, 0.2269548, 0.1792754, 0.5937698, 0.2955301, 0.1309859, 0.5734840, 0.3008197, 0.1344499,
                              0.5647303, 0.1919454, 0.2026290, 0.6054256, 0.1059793, 0.4190533, 0.4749674, 0.1190636, 0.3631279, 0.5178085, 0.1518314,
                              0.3181203, 0.5300483, 0.1424715, 0.3094615, 0.5480669))
  mydf$year &lt;- factor(mydf$year)
  mydf$answer &lt;- factor(mydf$answer)
  triangle_up &lt;- data.frame(year = c(2004, 2008, 2010),
                          direction = c("A great deal", "Hardly any", "Hardly any"),
                          result = c(0.2955301, 0.2026290, 0.4190533))
  triangle_up$year &lt;- factor(triangle_up$year)
  triangle_up$direction &lt;- factor(triangle_up$direction)
  triangle_down &lt;- data.frame(year = c(2002, 2008, 2010, 2010, 2012),
                              direction = c(rep("A great deal", 3), "Only some", "Hardly any"),
                              result = c(0.2269548, 0.1919454, 0.1059793, 0.4749674, 0.3631279))
  triangle_down$year &lt;- factor(triangle_down$year)
  triangle_down$direction &lt;- factor(triangle_down$direction)
  
  ggplot(mydf, aes(x = year, y = result)) + geom_line(aes(colour = answer, group = answer)) +
  geom_point(data = triangle_up, aes(x = year, y = result, group = direction, fill = direction), shape = 24, size = 3) +
  geom_point(data = triangle_down, aes(x = year, y = result, group = direction, fill = direction), shape = 25, size = 3)
  </code></pre>