I would be grateful if someone could tell me how to modify the legend in the following plot:
point_data <- data.frame(x = rnorm(10),
y = rnorm(10),
type=c(rep("A",5),rep("B",5)))
line_data <- data.frame(x=c(-1,0),
y=c(1,0))
ggplot(data=point_data,
aes(x=x,
y=y,
colour=type)) +
geom_point(size=0.75) +
geom_line(data=line_data,
aes(x=x,y=y,colour="myline"))
I want to remove "myline" from the legend, and have only points next to "A" and "B".