Skip to contents

A family of ggplot2 color scales based on the solaris palette (deep purple to gold). Available in continuous (_c), discrete (_d), binned (_binned), and diverging (_div) variants for both fill and colour aesthetics. American-spelling aliases (color) are provided for all colour variants.

Usage

scale_fill_solaris_c(reverse = FALSE, ..., aesthetics = "fill")

scale_colour_solaris_c(reverse = FALSE, ..., aesthetics = "colour")

scale_fill_solaris_d(reverse = FALSE, ..., aesthetics = "fill")

scale_colour_solaris_d(reverse = FALSE, ..., aesthetics = "colour")

scale_fill_solaris_binned(n = 6, reverse = FALSE, ..., aesthetics = "fill")

scale_colour_solaris_binned(n = 6, reverse = FALSE, ..., aesthetics = "colour")

scale_fill_solaris_div(mid = "#ffffff", limit = NULL, ..., aesthetics = "fill")

scale_colour_solaris_div(
  mid = "#ffffff",
  limit = NULL,
  ...,
  aesthetics = "colour"
)

Arguments

reverse

Logical. If TRUE, reverse the palette order (gold-to-purple instead of purple-to-gold). Default is FALSE.

...

Additional arguments passed to the underlying ggplot2 scale function.

aesthetics

Character string or vector of character strings listing the name(s) of the aesthetic(s) that this scale works with.

n

Integer. Number of bins (colors) to use for binned scales. Default is 6.

mid

Character. Color for the midpoint of diverging scales. Default is "#ffffff" (white).

limit

Numeric vector of length 2. Range of the scale. Default is NULL (automatic).

Value

A ggplot2 scale object.

Examples

if (FALSE) { # \dontrun{
library(ggplot2)

ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
  geom_tile() +
  scale_fill_solaris_c()

ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) +
  geom_point() +
  scale_colour_solaris_d()
} # }