We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Use forcats::fct_reorder() to reorder the data instead of the messy mutate. This is under dot plot/cleveland dot plot.
forcats::fct_reorder()
mtcars %>% rownames_to_column("model") %>% arrange(mpg) %>% mutate(model = factor(model, levels = .$model)) %>% ggplot(aes(mpg, model)) + geom_segment(aes(x = 0, xend = mpg, y = model, yend = model)) + geom_point() + scale_x_continuous(expand = expand_scale(mult = c(0, 0)), limits = c(0, 40)) + labs(x = NULL, y = "Miles Per Gallon")
The text was updated successfully, but these errors were encountered:
awunderground
No branches or pull requests
Use
forcats::fct_reorder()
to reorder the data instead of the messy mutate. This is under dot plot/cleveland dot plot.The text was updated successfully, but these errors were encountered: