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

Option to make default colour schemes accessible? #4696

Open
hadley opened this issue Dec 13, 2021 · 2 comments · May be fixed by #5946
Open

Option to make default colour schemes accessible? #4696

hadley opened this issue Dec 13, 2021 · 2 comments · May be fixed by #5946
Labels
feature a feature request or enhancement scales 🐍

Comments

@hadley
Copy link
Member

hadley commented Dec 13, 2021

It would be a shortcut for changing all of the default colour/fill scales.

@hadley hadley added feature a feature request or enhancement scales 🐍 labels Mar 14, 2022
@yutannihilation
Copy link
Member

Related: #4466

@teunbrand teunbrand linked a pull request Jun 21, 2024 that will close this issue
@teunbrand
Copy link
Collaborator

teunbrand commented Jun 21, 2024

Proposal in #5946 is to run this through the theme, so set_theme() can be used to change global defaults.

# From #5946
devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2

set_theme(
  theme_gray() +
    theme(
      palette.colour.continuous = pal_div_gradient(),
      palette.colour.discrete = palette.colors(7)
    )
)

p <- ggplot(mpg, aes(displ, hwy))
p + geom_point(aes(colour = cty))

p + geom_point(aes(colour = class))

Created on 2024-06-21 with reprex v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement scales 🐍
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants