I have the following code in R:
library(ggplot2)
theme_set(theme_bw())
p <- ggplot(mtcars, aes(wt, mpg))
p <- p + geom_point(aes(colour = factor(cyl)))
p
Resulting in this:
Each legend entry has a grey border around it. How to remove it?
Just add
+ theme(legend.key = element_rect(colour = NA))
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