我在R中有以下代码:
library(ggplot2)
theme_set(theme_bw())
p <- ggplot(mtcars, aes(wt, mpg))
p <- p + geom_point(aes(colour = factor(cyl)))
p
结果是:
每个图例条目周围都有一个灰色边框。如何删除?
只需添加
+ theme(legend.key = element_rect(colour = NA))
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句