title: ggplot2 remove linetype legend but keep color legend
body: <p>I have an R script to make a graph with <code>ggplot2</code>. To make a real reproducible example is a bit complicated but the code to make the plot is the following:</p>
  
  <pre><code> ggplot(df,aes(x=Year,y=value, colour = factor(mpft)), show.legend = T) +
        geom_line(aes(group = index, linetype=LETTERS[df$type]), size = .8) +
        scale_linetype_manual(name= "Run Type", values=lty.stock(seqle(run.type)),labels = run.type) +
        scale_color_manual(name = "PFT",
                           values = setNames(mycol[unique(df$mpft)], unique(df$mpft)),
                           labels = setNames(mynam[unique(df$mpft)], unique(df$mpft))) +
        scale_linetype_manual(name= "Run Type", values=lty.stock(seqle(run.type)),labels = run.type) +
  ...
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BmsfG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BmsfG.png" alt="enter image description here"></a></p>
  
  <p>How can I disable only the linetype legend possibly by a giving it a boolean condition. Something like </p>
  
  <pre><code>  scale_color_manual(..., show = TRUE) +
    scale_linetype_manual(..., show = FALSE) +
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>Since a user is pointing at the similarity with <a href="https://stackoverflow.com/questions/14604435/turning-off-some-legends-in-a-ggplot">Turning off some legends in a ggplot</a>
  I underline the fact that the dropping of the legend should depend upon a boolean condition. In that post the <code>guide = FALSE</code> option is used. This actually gives also here the correct result, however <code>guide = TRUE</code> produces an error.
  This can be overcome by using something like</p>
  
  <pre><code>p = ggplot() + ...
  if(condition) p = p + guides(linetype = FALSE)
  </code></pre>
  
  <p>It's not exactly what I was looking for but I guess it does the trick.</p>