generate_labels | R Documentation |
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
)
labels |
labels |
input |
c(0,0) |
nrows |
default: NULL |
ncols |
default: NULL |
x_offset |
0.3 |
y_offset |
0.15 |
just |
0~5 |
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.