changing the order of levels of the factor mapped to colour doesn't control it in legend
ellisp opened this issue · 0 comments
ellisp commented
in ggsdc
ldeaths_df %>%
mutate(sex = factor(sex, levels = c("male", "female"))) %>%
ggsdc(aes(x = YearMon, y = deaths, colour = sex), method = "seas") +
geom_line()
and
ldeaths_df %>%
mutate(sex = factor(sex, levels = c("female", "male"))) %>%
ggsdc(aes(x = YearMon, y = deaths, colour = sex), method = "seas") +
geom_line()
both produce the same results and they should change the order on the legend. An "as character" somewhere is killing the factor level ordering.