r - overlapping shape and character in ggplot legend -
when plot points , text same colour, a , shape overlap in legend.
can tell ggplot not draw a in legend? how?
m <- data.frame(t=letters[1:16], xx=runif(16), yy=runif(16), g=rep(c("a","b","c","d"),4)) str(m) ggplot(m,aes(x=xx,y=yy,label=t,colour=g)) + geom_point(shape=3) + geom_text(vjust=0,hjust=0) + scale_colour_discrete() 
just add show_guide = f geom_text:
ggplot(m,aes(x=xx,y=yy,label=t,colour=g)) + geom_point(shape=3) + geom_text(vjust=0,hjust=0, show_guide = f) + scale_colour_discrete() 
Comments
Post a Comment