kyle_textbox: Nice looking annotations using 'ggtext"

View source: R/ggplot_utils.R

kyle_textboxR Documentation

Nice looking annotations using 'ggtext“

Description

Nice looking annotations using 'ggtext“

Usage

kyle_textbox(
  label,
  x,
  y,
  size = 10,
  width = unit(0.2, "npc"),
  text.color = tailwind_color("zinc-800"),
  fill = "white",
  box.color = tailwind_color("zinc-300"),
  box.size = unit(0.5, "pt"),
  box.r = unit(4, "pt"),
  box.padding = unit(c(6, 6, 6, 6), "pt"),
  hjust = 0,
  vjust = 1
)

Arguments

label

Text to be displayed

x

x coordinate of the label

y

y coordinate of the label

size

Text size in points

width

width of textbox

text.color

color of text

fill

background color

hjust

horizontal justification

vjust

vertical justification

border.color

color of border

linewidth

width of border

label.r

radius of rounded corners

label.padding

padding around the label

Value

A ggplot layer object with a textbox annotation


kylebutts/kfbmisc documentation built on April 17, 2025, 5:20 p.m.