scale_fill_discrete does not change label names

Since you used the colour, linetype and shape but not fill, you have to integrate the new labeles with the scale_xxx_manual()calls like :

ggplot (data = eso3, aes (x=t, y = x, colour = w, linetype = w, shape= w))+
geom_line()+
geom_point()+
scale_linetype_manual("LEGEND TITLE",values =c("solid","solid","dashed","dashed","dotted","dotted"),breaks=c("A", "B", "C"), labels=c("O","R","N"))+
scale_colour_manual("LEGEND TITLE",values=c("black","black","darkgray","darkgray","dimgray","dimgray"),breaks=c("A", "B", "C"), labels=c("O","R","N"))+
scale_shape_manual("LEGEND TITLE",values=c(19,15,19,15,19,15),breaks=c("A", "B", "C"), labels=c("O","R","N"))+
scale_y_continuous("Y LABEL",limits=c(0.0,1.0))+
theme(axis.title.y = element_text(angle=0))+
ggtitle("MAIN TITLE")+
theme_bw()

enter image description here

Tags:

R

Label

Ggplot2