If your desire is to remove the legend from one aesthetic, execute the guides() function:
guides(color = FALSE)
guides(fill = FALSE)
guides(shape = FALSE)
Besides, you can apply scale_color_continuous(guide = FALSE) to eliminate the color legend since the contribution is a continuous variable.
For instance:
Plot with all legends:
ggplot(mtcars, aes(mpg, 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()
Plot without the color legend:
ggplot(mtcars, aes(mpg, 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() +
guides(color = FALSE)