Learn R Programming

cvms (version 1.8.0)

font: Create a list of font settings for plots

Description

lifecycle::badge("experimental")

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

Some arguments can take either the value to use directly OR a function that takes one argument (vector with the values to set a font for; e.g., the counts, percentages, etc.) and returns the value(s) to use for each element. Such a function could for instance specify different font colors for different background intensities.

NOTE: This is experimental and could change.

Usage

font(
  size = NULL,
  color = NULL,
  alpha = NULL,
  nudge_x = NULL,
  nudge_y = NULL,
  angle = NULL,
  family = NULL,
  fontface = NULL,
  hjust = NULL,
  vjust = NULL,
  lineheight = NULL,
  digits = NULL,
  prefix = NULL,
  suffix = NULL
)

Value

List of settings.

Arguments

size, color, alpha, nudge_x, nudge_y, angle, family, fontface, hjust, vjust, lineheight

Either the value to pass directly to ggplot2::geom_text or a function that takes in the values (e.g., counts, percentages, etc.) and returns a vector of values to pass to ggplot2::geom_text.

digits

Number of digits to round to. If negative, no rounding will take place.

prefix

A string prefix.

suffix

A string suffix.

Author

Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk

See Also

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