2015-09-28 19 views

Odpowiedz

8

Można użyć parametru themelegend.key. To jest

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

Przykład:

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

produkuje:

enter image description here

+0

Idealne, dziękuję za szybką reakcję! – wilsonm2

Powiązane problemy