I'm using the code below to generate a simple chart:
# Data and libs
data(mtcars)
reuire(ggplot2); require(ggthemes)
# Chart def
ggplot(mtcars, aes(wt, mpg, colour = as.factor(vs))) +
geom_point(aes(colour = factor(cyl))) +
facet_wrap(~ cyl) +
guides(colour = guide_legend(title = "Something")) +
geom_smooth(method = "lm", se = FALSE) +
theme_pander()
How can I remove the lines from the legend? I'm interested in legend showing only dots with corresponding colours without the lines derive from the geom_smooth(method = "lm", se = FALSE)
.
I had a look at the question on Turning off some legends in a ggplot, however, after reading it it wasn't clear to me how to disable the legend elements pertaining to a specific geom
.