opmi_pal: OPMI Palette Chooser

View source: R/colors.R

opmi_palR Documentation

OPMI Palette Chooser

Description

Creates a function that can be used by scale_fill_opmi and scale_color_opmi. Can also be used to create manual color/fill palettes for scale_color_manual and scale_fill_manual.

Usage

opmi_pal(
  palette = "main",
  reverse = FALSE,
  discrete = TRUE,
  mono = FALSE,
  monocol = "orange",
  ...
)

Arguments

palette

One of "main", "massdot", "diverging", "diverging2", or "rt"

reverse

Logical, whether to reverse palette

discrete

Logical, whether palette is for discrete scale

mono

Logical, whether to use a single-color palette

monocol

If mono = TRUE, which color to use for palette

...

Additional arguments passed to colorRampPalette

Value

A function that can be used by scale_fill_opmi and scale_color_opmi


kmeakinmbta/opmitools documentation built on Oct. 25, 2023, 10:34 a.m.