Skip to contents

Optimize the location of text labels to minimize overplotting text.

Usage

label_auto(
  x,
  y = NULL,
  ...,
  labels = seq_along(x),
  segment = FALSE,
  box = FALSE
)

Arguments

x, y

A numeric vector giving the x and y coordinates of a set of points. If y is NULL, an attempt is made to interpret x in a suitable way (see grDevices::xy.coords()).

...

Further arguments to be passed to graphics::text(), particularly, character expansion, cex and color, col.

labels

A character vector or expression specifying the text to be written.

segment

A logical scalar: should segments be drawn?

box

A logical scalar: should a box be drawn underneath labels?

Value

label_auto() is called it for its side-effects.

Note

For internal use only.

See also

graphics::text()

Other graphic tools: circle(), inch2line(), label_percent()

Author

N. Frerebeau