Skip to content

Guard against old discrete scales with identity palettes - #5933

Merged
teunbrand merged 4 commits into
tidyverse:mainfrom
teunbrand:purge_identity_palettes
Jul 11, 2024
Merged

teunbrand merged 4 commits into
tidyverse:mainfrom
teunbrand:purge_identity_palettes

Conversation

@teunbrand

Copy link
Copy Markdown
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.

Comment thread R/scale-discrete-.R Resolved

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Member

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
@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