title: Is there a way to apply gghighlight on only some geoms in a ggplot?
body: <p>I'm wondering if there's any way to have gghighlight only apply to geom_point() and geom_errorbar() but not geom_line(). If you look at the plot, gghighlight adds a new line to the graph connecting the two highlighted points, is there a way to stop this?</p>
  <p>I've tried adding geom_line() underneath gghighlight but then it only plots the line between the highlighted points and the original line no longer shows up.</p>
  <pre><code>ggplot(data = faithBest, aes(x = x, y=avgRegEr.k))+
    geom_point(colour = &quot;violet&quot;)+
    geom_line()+
    geom_errorbar(aes(ymin = avgRegEr.k-se, ymax = avgRegEr.k +se), colour = &quot;violet&quot;)+
    labs(
      title = &quot;Model Mean Squared Error VS Model Complexity&quot;,
      subtitle = &quot;How does the MSE of the linear regression model change when adding predictors?&quot;,
      x = &quot;Model Complexity (Number of Predictors)&quot;,
      y = &quot;Model Mean Squared Error&quot;
    )+
    scale_x_continuous(breaks = x)+
    gghighlight(x==4 | x==2, unhighlighted_params = list(colour = &quot;lightsteelblue3&quot;))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/weZXi.png" rel="nofollow noreferrer">Here's the graph produced</a></p>