bracket | R Documentation |
Draw a square bracket with a label on a ggplot
bracket(
xmin = NULL,
xmax = NULL,
ymin = NULL,
ymax = NULL,
vertical = NULL,
horizontal = NULL,
open = NULL,
bracket_shape = NULL,
thickness = 2,
bracket_color = "black",
label = NULL,
label_hjust = NULL,
label_vjust = NULL,
label_font_size = 5,
label_font_face = "bold",
label_color = "black",
label_parse = FALSE
)
xmin |
xmin |
xmax |
xmax |
ymin |
ymin |
ymax |
ymax |
vertical |
vertical |
horizontal |
horizontal |
open |
open |
bracket_shape |
bracket_shape |
thickness |
thickness |
bracket_color |
bracket_color |
label |
label |
label_hjust |
label_hjust |
label_vjust |
label_vjust |
label_font_size |
label_font_size |
label_font_face |
label_font_face |
label_color |
label_font_face |
label_parse |
label_parse |
a ggplot object; there will be no meaningful output from this function. Instead, this function should be used with another ggplot object
library(ggplot2)
ggplot(mtcars, aes(x = cyl, y = mpg)) + geom_point() +
bracket(6.1, 6.2, 17, 22, bracket_shape = "]", label = "abc")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.