label_repel {colorrepel}R Documentation

ggrepel labeling of clusters

Description

ggrepel labeling of clusters

Usage

label_repel(
  g,
  group_col = "auto",
  x = "x",
  y = "y",
  txt_pt = 3,
  remove_current = "auto",
  layer = "auto",
  ggbuild = NULL,
  ...
)

Arguments

g

ggplot object or data.frame

group_col

column name in data.frame, default to "label" or "group" in ggplot data

x

column name in data.frame for x

y

column name in data.frame for y

txt_pt

text size

remove_current

whether to remove current text

layer

text layer to remove, defaults to last

ggbuild

already built ggplot_built object if available

...

arguments passed to geom_text_repel

Value

function, if data.frame input, or new ggplot object

Examples

g <- label_repel(ggplot2::ggplot(mtcars, ggplot2::aes(x = hp, y = wt, color = as.character(cyl))) +
  ggplot2::geom_point(), remove_current = FALSE)

[Package colorrepel version 0.4.3 Index]