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

Fallback for colour scales #6289

Open
teunbrand opened this issue Jan 22, 2025 · 0 comments · May be fixed by #6216
Open

Fallback for colour scales #6289

teunbrand opened this issue Jan 22, 2025 · 0 comments · May be fixed by #6216

Comments

@teunbrand
Copy link
Collaborator

This issue was identified in #6287.

Some packages use scale_colour_continuous(low = "blue", high = "red"). This is only valid when end-users haven't touched the default "ggplot2.continuous.colour" options. The pattern these packages use are thus fragile and instead they should use scale_colour_gradient().
Likewise for scale_colour_discrete() and scale_colour_hue() and the fill aesthetic equivalents.

However, because the problem is quite ubiquitous (39 packages), we should have fallbacks in place.
I'll suggest that we use a grumpy fallback that always throws a warning, as the usage remains incorrect.

teunbrand added a commit to teunbrand/ggplot2 that referenced this issue Jan 22, 2025
@teunbrand teunbrand linked a pull request Jan 22, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant