Skip to content

Top key missing in guide_bins when reverse = TRUE #4210

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

Closed
petrbouchal opened this issue Sep 23, 2020 · 1 comment · Fixed by #4442
Closed

Top key missing in guide_bins when reverse = TRUE #4210

petrbouchal opened this issue Sep 23, 2020 · 1 comment · Fixed by #4442
Labels
bug an unexpected problem or unintended behavior guides 📏 scales 🐍
Milestone

Comments

@petrbouchal
Copy link

When guide_bins() is used with the reverse param set to TRUE, the key for the top bin is missing (and it seems the entire scale is shifted down in the key).

Tested on current dev ggplot2.

library(ggplot2)
df <- data.frame(a = 1:100, b = 1:100)

ggplot(df) +
  geom_point(aes(colour = b, x = a, y = b)) +
  guides(colour = guide_bins(reverse = T))

26d9d09b-64e1-4a34-b666-be1f3fe000cb

@petrbouchal
Copy link
Author

When filing #4234, I realised it is not clear that the default direction of the guide makes sense with large numbers at the bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior guides 📏 scales 🐍
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants