title: Display legends on a combined ggplot2 plot - Stacked bar and line
body: <p>I have a ggplot, which is a combination of a stacked graph and line graph</p>
  
  <pre><code>  ggplot() +
         geom_bar(data=smr2, aes(x=Pract, y=value, fill=variable), stat='identity') + 
         theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) +
         geom_line(data=summarised[,1:3], aes(x=Pract,y=YTDTarget, group=1),size = 1) +
         geom_point(data=summarised[,1:3], mapping = aes(x = Pract, y = YTDTarget),size=2.5)+
         geom_text_repel(data=summarised[,1:3], aes(x=Pract,y=YTDTarget,label=YTDTarget), size = 5)
  </code></pre>
  
  <p>I want to add the legend for line graph. But the part <code>group=1</code> seems to prevent this.</p>
  
  <p>The graph I created is as <a href="https://i.stack.imgur.com/lZfip.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lZfip.png" alt="enter image description here"></a></p>
  
  <p>Also, please help to change the name of the legend from variable to "Actuals"
  This graph is for compare the Target(line graph) against actually achieved(stacked Bar).</p>