setConnectorLabels: Attach labels to a connector object

View source: R/boxGrobs_labelConnector.R

setConnectorLabelsR Documentation

Attach labels to a connector object

Description

Store labels and presentation options on a connector object so labels are automatically drawn when the connector is printed.

Usage

setConnectorLabels(
  con,
  labels,
  gp = gpar(cex = 0.9),
  bg_gp = gpar(fill = "white", col = NA),
  x_offset = unit(0, "mm"),
  y_offset = unit(0, "mm")
)

Arguments

con

A connector (a 'connect_boxes' grob or 'connect_boxes_list').

labels

Character vector of labels (recycled to match connector length).

gp

A 'gpar' for label text.

bg_gp

A 'gpar' for label background.

x_offset

Unit offsets for label placement.

y_offset

Unit offsets for label placement.

Value

The connector object with attributes set (invisibly).


Gmisc documentation built on March 6, 2026, 9:09 a.m.