【发布时间】:2015-12-25 21:10:03
【问题描述】:
【问题讨论】:
-
将
+ theme(legend.key = element_rect(fill = "black"))添加到您的通话中 -
迟到了,但请加
+ coord_quickmap()!
【问题讨论】:
+ theme(legend.key = element_rect(fill = "black"))添加到您的通话中
+ coord_quickmap()!
您可以使用theme 的legend.key 参数。来自?theme:
legend.key:图例键下方的背景(element_rect();继承自rect)
那是
theme(legend.key = element_rect(fill = "black"))
一个例子:
a <- seq(1:5)
b <- seq(1:5)
c <- seq(1:5)
d <- data.frame(a, b, c)
ggplot(data = d, aes(x = a, y = b, color = factor(c))) +
geom_point() +
theme(legend.key = element_rect(fill = "yellow"))
产生:
【讨论】: