Skip to contents

Modifies active theme settings for fixed, discrete, and continuous palettes only for parameters explicitly provided by the user.

Usage

update_palette(
  fixed = NULL,
  discrete = NULL,
  continuous = NULL,
  aesthetic = c("colour", "fill")
)

Arguments

fixed

Colour applied to geometric elements via element_geom(). Updates the aesthetics named in aesthetic.

discrete

Palette specification (e.g., scales::pal_hue()) for discrete scales (palette.<aesthetic>.discrete).

continuous

Palette specification for continuous scales (palette.<aesthetic>.continuous).

aesthetic

Which aesthetic(s) to update: "colour", "fill", or both (the default).

Value

Invisibly returns the result of the theme_update() calls.

Examples

if (FALSE) { # \dontrun{
# Update fixed geom colour and fill
update_palette(fixed = "steelblue")

# Update only the fill of fixed geoms
update_palette(fixed = "steelblue", aesthetic = "fill")

# Update discrete palette for colour only
update_palette(discrete = scales::pal_hue(), aesthetic = "colour")

# Update continuous palette for both colour and fill
update_palette(continuous = scales::pal_viridis())
} # }