Remove legend ggplot 2.2
<p>I'm trying to keep the legend of one layer (smooth) and remove the legend of the other (point). I have tried shutting off the legends with <code>guides(colour = FALSE)</code> and <code>geom_point(aes(color = vs), show.legend = FALSE)</code>. </p>

<p><strong>Edit</strong>: As this question and its answers are popular, a reproducible example seems in order:</p>

<pre><code>library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, group = gear)) +
geom_point(aes(color = vs)) +
geom_point(aes(shape = factor(cyl))) +
geom_line(aes(linetype = factor(gear))) +
geom_smooth(aes(fill = factor(gear), color = gear)) + 
theme_bw() 
</code></pre>

<p><a href="https://i.stack.imgur.com/Im5Kh.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Im5Kh.png" alt="enter image description here"></a></p>