| rrx2x | R Documentation |
Function transform user coordinates of plot to axis coordinates or vise versa.
rrx2x(x)
rry2y(x)
x2rrx(x)
y2rry(x)
x |
Value to transform. |
The default plot type "rr" uses transformed coordinates, so the user can
read percents on y axis and micrometers on x axis, while par('usr')
returns coordinates in log(x) and log(log(100/y)).
Hence the user can use transformation functions to convert between the types.
The "rr" keyword in the name of function, belongs to the log x log-log (usr) space.
Functions return appropriate transformed value.
plot.std
data(lignite)
plot(lignite)
# query for exact x coordinates within the plot
if(interactive()) rrx2x(locator()$x)
# query for exact y coordinates within the plot
if(interactive()) rry2y(locator()$y)
# or
y2rry(36.78794)
# or
rrx2x(par('usr')[1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.