df <- data.frame(x=rep(1:10,2), y=c(1:10,11:20),
group=c(rep("a",10),rep("b",10)))
g <- ggplot(df, aes(x=x, y=y, group=group))
g <- g + geom_line(aes(colour=group))
g <- g + geom_point()+geom_text(aes(label = y,vjust = 1, size=4))
Code as above
First I have read some answers and know how to remove the legend in ggplot, but now I have no ideal about the name of following plot text legend, the "4a4" part, and how to remove it. I have tried to add "guide = F" in geom_text or " p + guides(label = F)", but it still doesn't work.
so how to remove the text legend?