xy_text: Add Text to Plot at Relative Coordinates

View source: R/functions.R

xy_textR Documentation

Add Text to Plot at Relative Coordinates

Description

Add text to a plot at specific relative coordinates, e.g. 50%, 50%.

Usage

xy_text(x, y, labels, ...) 

Arguments

x

numeric

y

numeric

labels

string

...

arguments passed to text

Details

See text.

Value

A vector of coordinates, returned invisibly.

Author(s)

Enrico Schumann

See Also

text

Examples

plot(0:10, 0:10)
lines(5,5, col = "blue", pch = 19, type = "p")
xy_text(0.5,0.5, "The Centre", pos = 1)
xy_text(0.5,0.5, "The Centre", pos = 2)
xy_text(0.5,0.5, "The Centre", pos = 3)
xy_text(0.5,0.5, "The Centre", pos = 4)

enricoschumann/esutils documentation built on Feb. 2, 2024, 10:03 a.m.