label_repel {colorrepel}R Documentation

ggrepel labeling of clusters

Description

ggrepel labeling of clusters

Usage

label_repel(
  g,
  group_col = "group",
  x = "x",
  y = "y",
  txt_pt = 3,
  remove_current = TRUE,
  layer = "auto"
)

Arguments

g

ggplot object or data.frame

group_col

column name in data.frame, default to "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

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.1.0 Index]