label_outliers | R Documentation |
label_outliers
adds a text_repel layer to an existing ggplot object. It is intended to be used with boxplots or beeswarm plots. Faceting will result in separate computations for outliers.
It requires the ggrepel
package.
label_outliers(
plotbase,
labelvar = NULL,
coef = 1.5,
nudge_x = 0,
nudge_y = 0,
color = "darkred",
size = 3,
hjust = 0,
face = "bold"
)
plotbase |
ggplot object to add labels to. |
labelvar |
variable to use as label. If NULL, rownames or rownumbers are used. |
coef |
coefficient for boxplot.stats, defaults to 1.5. |
nudge_x |
nudge in x direction, defaults to 0. |
nudge_y |
nudge in y direction, defaults to 0. |
color |
color of labels, defaults to darkred. |
size |
size of labels, defaults to 3. |
hjust |
horizontal justification of labels, defaults to 0. |
face |
font face of labels, defaults to bold. |
A ggplot object, allowing further styling.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.