Используйте adj=
на базовых участках:
plot(1)
usr <- par("usr")
text(usr[1], usr[3], adj = c(-0.1, -0.1), "lower-left")
text(usr[2], usr[3], adj = c( 1.1, -0.1), "lower-right")
text(usr[1], usr[4], adj = c(-0.1, 1.1), "upper-left")
text(usr[2], usr[4], adj = c( 1.1, 1.1), "upper-right")
От ?text
:
adj: one or two values in [0, 1] which specify the x (and
optionally y) adjustment ('justification') of the labels,
with 0 for left/bottom, 1 for right/top, and 0.5 for
centered. On most devices values outside [0, 1] will also
work. See below.
Я использую -0.1
и 1.1
, чтобы немного вставить от самой линии поля. Компонент .1
может потребоваться настроить в зависимости от остальной части графика.