r - ggplot2 avoid boxes around legend symbols -
consider example plot below. i'd make little boxes around each of symbols in legend go away. how this?
ggplot(mtcars, aes(wt, mpg, shape=factor(cyl))) + geom_point() + theme_bw()
you're looking for:
+ opts(legend.key = theme_blank())
you can see lots of examples of sorts of stuff in ?opts
. couldn't remember off top of head 1 was, tried few until got right.
note: since version 0.9.2 opts
has been replaced theme
:
+ theme(legend.key = element_blank())
Comments
Post a Comment