ggplot2
ggplot2 copied to clipboard
Guard against old discrete scales with identity palettes
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.