userCoords: Transfer relative to actual plot coordinate values

Description Usage Arguments Details Value Author(s) Examples

Description

userCoords transfers realtive coordinate values (i.e. values between 0 and 1) to the actual coordinate system of the plot.

Usage

1
userCoords(x = c(), y = c())

Arguments

x

numeric vector(0-1): relative coordinates on the x axis

y

numeric vector(0-1): relative coordinates on the y axis

Details

x and y need to be values between 0 and 1. These values are then mapped to the coordinates used in the current plot.

Value

list with x and/or y component with values in the current coordinate system

Author(s)

Jannis v. Buttlar

Examples

1
2
3
plot(1:10)
text.coords <- userCoords(x=c(0.1,0.5),y=c(0.9,0.5))
text(text.coords,labels=c('1st Text','2nd Text'))

JBTools documentation built on May 2, 2019, 8:20 a.m.