Last chance! 50% off unlimited learning
Sale ends in
Internal function. Typically called by other functions to scale the position of the axes data.frame or another data.frame to plot relative to the data.
map_relative(
x,
position = c("center", "left", "right", "bottomleft", "topright", "full", "off",
"top1d", "floor1d", "bottom1d"),
to = NULL
)
Numeric matrix or data.frame, first 2 columns and scaled and offset
the to
object.
Text specifying the position the axes should go to. Defaults to "center" expects one of: c("center", "left", "right", "bottomleft", "topright", "full", "off", "top1d", "floor1d", "bottom1d").
Data.frame to scale to. Based on the min/max of the first 2 columns. If left NULL defaults to data.frame(x = c(-1L, 1L), y = c(-1L, 1L).
Transformed values of x
, dimension and class unchanged.
map_absolute
for more manual control.
Other linear mapping functions:
map_absolute()
# NOT RUN {
## !!This function is not meant for external use!!
rb <- tourr::basis_random(4, 2)
map_relative(x = rb, position = "bottomleft")
map_relative(x = rb, position = "right", to = wine[, 2:3])
# }
Run the code above in your browser using DataLab