segments_text: Display a line with text above in a figure

View source: R/segments_text.R

segments_textR Documentation

Display a line with text above in a figure

Description

especially useful for boxplot (p-value comparison of groups)

Usage

segments_text(
  text,
  pos = c("above", "below"),
  x0 = 1,
  x1 = 2,
  y,
  lty = "dotted"
)

Arguments

text

text displayed

pos

text position regarding the line

x0

line coordinates x_0 (by default = 1, to ease boxplots)

x1

line coordinates x_1 (by default = 2, to ease boxplots)

y

line coordinates y (horizontal line only)

lty

line lty


lbraglia/lbmisc documentation built on June 14, 2025, 6:44 p.m.