labels_shadow: Plot Labels with Contrasting Shadow

View source: R/labels_shadow.R

labels_shadowR Documentation

Plot Labels with Contrasting Shadow

Description

Plot labels (text) with a contrasting buffer to make them more visible when located on a similar color background. This function is the shadowtext() function developed by Greg Snow. Called by plot functions: plot_dec_grph, plot_compar

Usage

labels_shadow(
  x,
  y = NULL,
  labels,
  col = "black",
  bg = "white",
  theta = seq(0, 2 * pi, length.out = 50),
  r = 0.1,
  cex = 1,
  ...
)

Arguments

x, y

numeric vector of coordinates where the labels should be plotted. Alternatively, a single argument x can be provided with the same syntax as in xy.coords.

labels

set of labels provided as a character vector.

col, bg

graphical parameters for the label color and background (buffer) color.

theta

angles for generating the buffer with possible anisotropy along one direction (default is isotropic) and controlling buffer smoothness (angular resolution).

r

thickness of the buffer relative to the size of the used font, by default 0.1.

cex

size of the label, by default 1.

...

Further graphical parameter accepted by text, such as pos, offset, or family.

Value

Don't return value. It creates a contrasting buffer to make labels more visible.

References

https://rdrr.io/cran/TeachingDemos/man/shadowtext.html


zoometh/iconr documentation built on Nov. 9, 2023, 10:01 a.m.