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))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.