Learn R Programming

JBTools (version 0.7.2.9)

userCoords: Transfer relative to actual plot coordinate values

Description

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

Usage

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

Value

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.

Examples

Run this code
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'))

Run the code above in your browser using DataLab