Skip to content
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

Guard against old discrete scales with identity palettes #5933

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR is an amendement to #5770.

Briefly, we introduced the palette argument, but revdep check show that some people contstruct their discrete position scales using discrete_scale(..., palette = identity). The identity palette is problematic as it doesn't return the expected values. This PR replaces identity palettes with seq_len to keep consistent behaviour with older scales.

R/scale-discrete-.R Outdated Show resolved Hide resolved
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

@teunbrand teunbrand merged commit 257ffaf into tidyverse:main Jul 11, 2024
11 checks passed
@teunbrand teunbrand deleted the purge_identity_palettes branch July 11, 2024 18:18
teunbrand added a commit to teunbrand/ggplot2 that referenced this pull request Nov 22, 2024
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.

2 participants