When I plot points and text with the same colour, the a
and the shape overlap in the legend.
Can I tell ggplot not to draw the a
in the 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
for your 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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With