Remove extra legends in ggplot2
I have a simple data frame that I'm trying to do a combined line and point plot using ggplot2. Supposing my data looks like this:
And I'm trying to make a plot:
g <- ggplot(df, aes(x=x, y=y, group=group)) g <- g + geom_line(aes(colour=group)) g <- g + geom_point(aes(colour=group, alpha = .8)) g
The result looks fine with one exception. It has an extra legend showing the alpha for my geom_point layer.
How can I keep the legend showing group colors, but not the one that shows my alpha settings?
