Generate labels position
generate_labels(
labels = NULL,
input = c(0, 0),
nrows = NULL,
ncols = NULL,
x_offset = 0.3,
y_offset = 0.15,
just = 1
)
matrix
library(ggplot2)
labels <- vapply(1:8, \(i)paste0(sample(LETTERS, 4), collapse = ""), character(1))
df <- data.frame(label = labels, generate_labels(labels))
ggplot(data = df) +
geom_label(aes(x = X1, y = X2, label = label))