split_text_grob {tern} | R Documentation |
Split text according to available text width
Description
Dynamically wrap text.
Usage
split_text_grob(
text,
x = grid::unit(0.5, "npc"),
y = grid::unit(0.5, "npc"),
width = grid::unit(1, "npc"),
just = "centre",
hjust = NULL,
vjust = NULL,
default.units = "npc",
name = NULL,
gp = grid::gpar(),
vp = NULL
)
Arguments
text |
( |
x |
A numeric vector or unit object specifying x-values. |
y |
A numeric vector or unit object specifying y-values. |
width |
( |
just |
The justification of the text
relative to its (x, y) location. If there are two values, the first
value specifies horizontal justification and the second value specifies
vertical justification. Possible string values are: |
hjust |
A numeric vector specifying horizontal justification.
If specified, overrides the |
vjust |
A numeric vector specifying vertical justification.
If specified, overrides the |
default.units |
A string indicating the default units to use
if |
name |
A character identifier. |
gp |
An object of class |
vp |
A Grid viewport object (or NULL). |
Details
This code is taken from R Graphics by Paul Murell, 2nd edition
Value
A text grob
.