stringSize: Size of a character string in current font
Description
Calculates the approximate relative x and
y spans of the input character string x
in the current par("usr") coordinates. The srt,
adj, and cex inputs are exactly those specified
by the par function.
Usage
stringSize(x, srt=0, adj=0.5, cex=1)
Value
a list of x- and y-vectors that can be used to estimate the
width and height, respectively, of the input character string in the current
par("usr") coordinates. Each vector contains a relative starting and ending
value and the absolute difference between the two values represents the span
in the corresponding direction.
Arguments
x
a character string.
adj
a numeric value on the interval [0,1] used to justify the text relative to
its placement in a plot. Default: 0.5 (center aligned).
cex
the expansion value for the character string. Default: 1.
srt
a numeric value defining the amount of string rotation in degrees. Default: 0.