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
When creating a horizontal grouped bar chart the order in the legend does not match the order of the bars in the plot.
library(ggplot2) library(dplyr) p <- mtcars %>% group_by(cyl, am) %>% summarise(n = n()) %>% ggplot(aes(cyl, n, fill = factor(am))) + geom_col(position = "dodge") + coord_flip()
Changing this involves some functions I almost never use (and thus always forget).
p + guides(fill = guide_legend(reverse = TRUE))
My proposal is to have something like easy_reverse_legend(). What do you think @jonocarroll?
easy_reverse_legend()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When creating a horizontal grouped bar chart the order in the legend does not match the order of the bars in the plot.
Changing this involves some functions I almost never use (and thus always forget).
My proposal is to have something like
easy_reverse_legend()
. What do you think @jonocarroll?The text was updated successfully, but these errors were encountered: