Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing the order of levels of the factor mapped to colour doesn't control it in legend #12

Closed
ellisp opened this issue Oct 9, 2016 · 0 comments
Assignees
Labels

Comments

@ellisp
Copy link
Owner

ellisp commented Oct 9, 2016

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.

@ellisp ellisp added the bug label Oct 9, 2016
@ellisp ellisp self-assigned this Oct 9, 2016
@ellisp ellisp closed this as completed in 2211a1d Oct 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant