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() 

enter image description here


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -