ggplot2: Why is color order of geom_line() graphs reversed?
问题 The code below plots a graph in which the names of the colors appear in the legend in the correct order, but the colors themselves appear in the reverse order. Why? year <- 2000:2009 a1 <- 4 + rnorm(10) a2 <- 3 + rnorm(10) a3 <- 2 + rnorm(10) a4 <- 0.25 * rnorm(10) vv <- tibble(year, a1, a2, a3, a4) test <- ggplot(data=vv) + aes(x=year) + geom_line(aes(y = a1, colour= "blue")) + geom_line(aes(y = a2, colour= "green")) + geom_line(aes(y = a3, colour= "yellow")) + geom_line(aes(y = a4, colour=