Learn R Programming

cvms (version 1.8.0)

dynamic_font_color_settings: Create a list of dynamic font color settings for plots

Description

lifecycle::badge("experimental")

Creates a list of dynamic font color settings for plotting with cvms plotting functions.

Specify separate colors below and above a given value threshold.

NOTE: This is experimental and will likely change.

Usage

dynamic_font_color_settings(
  threshold = NULL,
  by = "counts",
  all = NULL,
  counts = NULL,
  normalized = NULL,
  row_percentages = NULL,
  col_percentages = NULL,
  invert_arrows = NULL
)

Value

List of settings.

Arguments

threshold

The threshold at which the color changes.

by

The value to check against `threshold`. One of {`counts`, `normalized`}.

all

Set same color settings for all fonts at once. Takes a character vector with two hex code strings (low, high). Example: `c('#000', '#fff')`.

counts, normalized, row_percentages, col_percentages

Set color settings for the individual font. Takes a character vector with two hex code strings (low, high). Example: `c('#000', '#fff')`.

Specifying colors for specific fonts overrides the settings specified in `all` (for those fonts only).

invert_arrows

String specifying when to invert the color of the arrow icons based on the threshold. One of {`below`, `at_and_above`} (or NULL for no dynamical arrow colors).

Author

Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk

See Also

Other plotting functions: font(), plot_confusion_matrix(), plot_metric_density(), plot_probabilities(), plot_probabilities_ecdf(), sum_tile_settings()