scale_fill_okcolors: Custom ggplot2 Fill Scale Using okcolors Palettes

View source: R/scales.R

scale_fill_okcolorsR Documentation

Custom ggplot2 Fill Scale Using okcolors Palettes

Description

Applies a custom continuous or discrete fill scale to ggplot2 plots using a selected okcolors palette.

Usage

scale_fill_okcolors(
  palette = "obsession",
  discrete = FALSE,
  direction = 1,
  ...
)

Arguments

palette

Character. Name of the palette to use. See valid_palettes() for available options. Default is "obsession".

discrete

Logical. Whether to use a discrete scale (TRUE) or a continuous scale (FALSE). Default is FALSE.

direction

Integer. Use 1 for the palette order or -1 to reverse it. Default is 1.

...

Additional arguments passed to ggplot2::discrete_scale() or ggplot2::scale_fill_gradientn().

Value

A Scale object that can be added to a ggplot2 plot.


okcolors documentation built on July 2, 2026, 5:07 p.m.