This sets parameters for text on a path that aren't expected to change during the construction of a grob.
static_text_params(
.type = "text",
text_only = FALSE,
gap = NULL,
upright = TRUE,
halign = "center",
offset = NULL,
parse = FALSE,
straight = FALSE,
padding = unit(0.05, "inch"),
text_smoothing = 0,
rich = FALSE,
remove_long = FALSE
)
A list
with the parameters.
A character(1)
with either "text"
or "label"
, which
decides what the default is going to be for the gap
argument. If "text"
the default is NA
, which means to dynamically decide. If "label"
, the
"gap"
argument should default to FALSE
.
A logical(1)
indicating whether the path part should be
plotted along with the text (FALSE
, the default). If TRUE
, any
parameters or aesthetics relating to the drawing of the path will be
ignored.
A logical(1)
which if TRUE
, breaks the path into two sections
with a gap on either side of the label. If FALSE
, the path is plotted
as a whole. Alternatively, if NA
, the path will be broken if the string
has a vjust
between 0 and 1, and not otherwise. The default for the label
variant is FALSE
and for the text variant is NA
.
A logical(1)
which if TRUE
(default), inverts any text
where the majority of letters would upside down along the path, to improve
legibility. If FALSE
, the path decides the orientation of text.
A character(1)
describing how multi-line text should be
justified. Can either be "center"
(default), "left"
or "right"
.
A unit
object of length 1 to determine the
offset of the text from the path. If this is NULL
(default), the vjust
parameter decides the offset. If not NULL
, the offset
argument
overrules the vjust
setting.
A logical(1)
which if TRUE
, will coerce the labels into
expressions, allowing for plotmath syntax to be used.
A logical(1)
which if TRUE
, keeps the letters of a label
on a straight baseline and if FALSE
(default), lets individual letters
follow the curve. This might be helpful for noisy paths.
A unit
object of length 1 to determine the
padding between the text and the path when the gap
parameter trims the
path.
a numeric(1)
value between 0 and 100 that smooths
the text without affecting the line portion of the geom. The default value
of 0
means no smoothing is applied.
A logical(1)
whether to interpret the text as html/markdown
formatted rich text. Default: FALSE
. See also the rich text section of
the details in geom_textpath()
.
if TRUE, labels that are longer than their associated path will be removed.