Add cluster labels to a tSNE ggplot2 plot
addLabels(centers, label_repel = FALSE, label_size = 4, label_short = FALSE, clusters = NULL)
centers | Data frame with at least three columns: "mean_x", "mean_y",
and "Cluster", as returned by |
---|---|
label_repel | Logical, whether to plot cluster labels repelled from the center, on a slightly transparent white background and with an arrow pointing to the cluster center. If FALSE, simply plot the cluster label at the cluster center. Default: TRUE. |
label_size | Numeric, controls the size of text labels. Default: 4. |
label_short | (Optional/Experimental!!) Logical, if TRUE, assumes clusters
(at |
clusters | (Optional) Clusters for which labels should be plot (if only a subset of clusters should be labelled). Default: NULL (Label all clusters). |