Skip to content

Option to make default colour schemes accessible? #4696

Closed

Description

@hadley

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

Activity

  1. added
    feature
    on Mar 14, 2022
  2. yutannihilation commented on Jul 23, 2022

    @yutannihilation
    Member

    Related: #4466

  3. teunbrand commented on Jun 21, 2024

    @teunbrand
    Collaborator

    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

  4. hadley commented on Dec 4, 2024

    @hadley
    MemberAuthor

    Maybe it's worth having a theme_grey2() or similar that uses the better palettes? Or make it an option to more of the themes? I would eventually like to make this the default if you use some tidyverse wide edition, a la tidyverse/tidyverse#284.

  5. teunbrand commented on Dec 4, 2024

    @teunbrand
    Collaborator

    Thomas and I discussed this to some extent and we plan to put better defaults behind an 'edition 2025' switch, similar in spirit to the testthat 3rd edition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurescales 🐍

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions