title: ggplot generating two legends when only one is wanted
body: <p>In R I'm trying to generate a plot where I want to apply unique colors, line types, transparencies, and line thicknesses by case grouping. As currently implemented two legend plots are generated instead of one. The second legend plot is the only one that I can change the legend title. Presumably I've made a mistake any help would be greatly appreciated.</p>
  
  <p>Ultimately I want to generate a single legend and have the style changes and labeling changes take effect.</p>
  
  <pre><code>library(ggplot2)
  temp_df &lt;- data.frame(year = integer(50), value = numeric(50), case = character(50))
  temp_df$year &lt;- 1:50
  temp_df$value &lt;- runif(50)
  temp_df$case &lt;- "A"
  df &lt;- temp_df
  temp_df$value &lt;- runif(50)
  temp_df$case &lt;- "B"
  df &lt;- rbind(df, temp_df)
  LineTypes &lt;- c("solid", "dotted")
  colors &lt;- c("red", "black")
  linealphas &lt;- c(1, .8)
  linesizes &lt;- c(1, 2)
  Plot &lt;- ggplot(df, aes(x = year, y = value, group = case))+
    geom_line(aes(linetype = case, color = case, size = case, alpha = case))+
    scale_linetype_manual(values = LineTypes)+
    scale_color_manual(values = colors)+
    scale_y_continuous(limits = c(0, 1), labels = scales::percent)+
    scale_alpha_manual(values = linealphas)+
    scale_size_manual(values = linesizes)+
    xlab("Year")+
    ylab("Percentage%")+
    labs(color = "Scenario")+
    theme_minimal()
  Plot
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/z1lpR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z1lpR.png" alt="Result of Current Code"></a></p>