Skip to content

More configurable continuous colorscale defaults #3827

Closed
@cpsievert

Description

@cpsievert

scale_[fill/colour]_[continuous/binned] have a type argument which provides an entrypoint for customizing the scale's default. Currently, type only supports gradient and viridis. It seems reasonable that it could also support an arbitrary function, which would make the default much more configurable. For example:

library(ggplot2)
scale_colour_custom <- function(...) {
  scale_colour_gradient(..., low = "white", high = "green")
}
options(ggplot2.continuous.colour = scale_colour_custom)
qplot(1:10, 1:10, color = 1:10)

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions