Skip to content

Fix extended bins in guide_coloursteps() #4423

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

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

thomasp85
Copy link
Member

Fix #4019

This PR fixes the issue with extended terminal bins in guide_coloursteps() by removing breaks if they coincide

@thomasp85 thomasp85 added this to the ggplot2 3.3.4 milestone Apr 16, 2021
Copy link
Member

@yutannihilation yutannihilation left a comment

Choose a reason for hiding this comment

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

Looks good.

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

df <- data.frame(x = 0:4)

ggplot(df, aes(x, 0)) +
  geom_point(aes(fill = x), pch = 21, size = 80) +
  scale_fill_steps(low = "white", high = "red", limits = c(1, 3), oob = scales::censor)

Created on 2021-04-16 by the reprex package (v2.0.0)

@thomasp85 thomasp85 merged commit 0e142bb into master Apr 19, 2021
@thomasp85 thomasp85 deleted the issue-4019-colourstep-limits branch April 19, 2021 08:36
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.

scale_fill_steps produces unevenly spaced legend when limits are set
2 participants