Skip to content

Make guide_bins() respect override.aes #4104

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

Conversation

yutannihilation
Copy link
Member

Fix #4085

It seems we simply forgot to pass override.aes to the guide object. guide_merge.bins() and guide_geom.bins() seem to handle override.aes() properly.

devtools::load_all("~/repo/ggplot2")
#> Loading ggplot2

ggplot(mtcars, aes(x = drat, y = wt, size = hp, fill = cyl)) + 
  geom_point(shape = 21) + 
  scale_size_binned(guide = guide_bins(override.aes = list(colour = "red", shape = 21, fill = "blue")))

Created on 2020-06-30 by the reprex package (v0.3.0)

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks!

@thomasp85 thomasp85 added this to the ggplot2 3.3.4 milestone Mar 25, 2021
@yutannihilation yutannihilation merged commit 36d5b07 into tidyverse:master Mar 25, 2021
@yutannihilation yutannihilation deleted the fix/issue-4085-guide-bins-override.aes branch March 25, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot override.aes with guide_bins?
2 participants