tidyverse / ggplot2

An implementation of the Grammar of Graphics in R
https://ggplot2.tidyverse.org
Other
6.39k stars 2k forks source link

Guard against old discrete scales with identity palettes #5933

Open teunbrand opened 1 month ago

teunbrand commented 1 month ago

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.