title: Regression lines in ggplot
body: <p>I have a 2 x 2 <a href="/questions/tagged/ancova" class="post-tag" title="show questions tagged &#39;ancova&#39;" rel="tag">ancova</a> with the resulting plot showing 4 regression lines and 4 groups in various colours on the plot. I wish to retain the 4 colours in the plot but only show 2 <a href="/questions/tagged/regression" class="post-tag" title="show questions tagged &#39;regression&#39;" rel="tag">regression</a> lines for one of the variables - not all 4 as shown. The data is here-</p>
  
  <pre><code>PLD.df &lt;- structure(list(Site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
  2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Inshore", "OffReef"
  ), class = "factor"), Depth = structure(c(1L, 1L, 1L, 1L, 1L, 
  1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
  1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L), .Label = c("Deep", "Shallow"
  ), class = "factor"), PLD = c(37L, 38L, 47L, 51L, 51L, 53L, 34L, 
  39L, 40L, 45L, 49L, 49L, 26L, 29L, 35L, 35L, 36L, 36L, 37L, 38L, 
  38L, 40L, 41L, 46L, 47L, 52L, 37L, 38L, 40L, 45L, 45L), Location = structure(c(1L, 
  1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 
  3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), .Label = c("ID", 
  "IS", "OD", "OS"), class = "factor"), b = c(0.052, 0.05, 0.039, 
  0.043, 0.036, 0.033, 0.055, 0.051, 0.048, 0.046, 0.041, 0.04, 
  0.05, 0.05, 0.051, 0.049, 0.056, 0.052, 0.047, 0.045, 0.047, 
  0.045, 0.045, 0.045, 0.039, 0.038, 0.046, 0.049, 0.046, 0.044, 
  0.041)), .Names = c("Site", "Depth", "PLD", "Location", "b"), class = "data.frame", row.names = c(NA, 
  -31L))
  </code></pre>
  
  <p>The plot is below-</p>
  
  <p>ANCOVA Plot:</p>
  
  <p><a href="https://i.stack.imgur.com/J9yc9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J9yc9.jpg" alt="enter image description here"></a></p>
  
  <p>and the code i used to create it is here-</p>
  
  <pre><code>ggplot(PLD.df, aes(x=PLD, y=b, colour=Location)) + 
    geom_point(aes(shape=Location),size=3) + 
    scale_shape(solid=FALSE) + 
    scale_colour_manual(values=cb_palette) + 
    geom_smooth(aes(linetype=Location),method=lm, se=FALSE, fullrange=F) + 
    theme(panel.border=element_rect(colour="black", fill=NA,size=3),
          panel.background=element_rect(fill=FALSE),
          panel.grid.major=element_blank(),
          panel.grid.minor=element_blank()) + 
    theme(legend.position="NONE")
  </code></pre>
  
  <p>Would the easiest way to be to remove the lines all together and then use the <code>predictvals()</code> function to redraw the required lines? I would like only show the regression lines for the "Inshore" and "Offreef" locations while retaining the colours for all 4 sites.</p>
  
  <p><strong>Note:</strong> This is my first question here so apologies if my question format is not correct or I haven't included all of the necessary information. Thanks!</p>