label_repel {colorrepel} | R Documentation |
ggrepel labeling of clusters
label_repel(
g,
group_col = "group",
x = "x",
y = "y",
txt_pt = 3,
remove_current = TRUE,
layer = "auto"
)
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 |
function, if data.frame input, or new ggplot object
g <- label_repel(ggplot2::ggplot(mtcars, ggplot2::aes(x = hp, y = wt, color = as.character(cyl))) +
ggplot2::geom_point(), remove_current = FALSE)