convertXY {graphics} | R Documentation |
Convert between graphics coordinate systems.
grconvertX(x, from = "user", to = "user") grconvertY(y, from = "user", to = "user")
x, y |
numeric vector of coordinates. |
from, to |
character strings giving the coordinate systems to convert between. |
The coordinate systems are
"user"
"inches"
"device"
"ndc"
"nfc"
"npc"
"nic"
Device coordinates are those in which the device works: they are
usually in pixels where that makes sense and in big points (1/72 inch)
otherwise (e.g. pdf
and postscript
).
A numeric vector of the same length as the input.
op <- par(omd=c(0.1, 0.9, 0.1, 0.9), mfrow = c(1, 2)) plot(1:4) for(tp in c("in", "dev", "ndc", "nfc", "npc", "nic")) print(grconvertX(c(1.0, 4.0), "user", tp)) par(op)