Closed
Description
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)