scale_color_tt: Color scale constructor for ttcolors

View source: R/ttcolors.R

scale_color_ttR Documentation

Color scale constructor for ttcolors

Description

To be used in a ggplot, with option discrete set to TRUE for discrete values

Usage

scale_color_tt(
  palette = "main",
  aesthetics = "color",
  discrete = TRUE,
  reverse = FALSE,
  nmax = NULL,
  order = NULL,
  ...
)

Arguments

palette

Character name of palette. Run names(ttr::ttpalettes) for available options.

aesthetics

Default to color for scale_color_tt() and fill for scale_fill_tt().

discrete

Boolean indicating whether color aesthetic is discrete or not.

reverse

If TRUE, reverse the order of the colors in the color scale.

nmax

Maximum number of different colors the palette should contain. If not provided, is calculated automatically from the data.

order

Numeric vector listing the order in which the colors should be used. Default is 1:nmax.

...

Additional arguments passed to ggplot2::discrete_scale() or ggplot2::scale_color_gradientn(), used respectively when discrete is TRUE or FALSE.


ttecon/ttr documentation built on March 6, 2023, 7:36 a.m.