2015-09-28 9 views

Antwort

8

können Sie die legend.key Parameter von theme verwenden. Das ist

theme(legend.key = element_rect(fill = "black"))

Ein Beispiel:

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")) 

produziert:

enter image description here

+0

Perfekt, danke für die schnelle Antwort! – wilsonm2

Verwandte Themen