map_relative | R Documentation |
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", "off", "top1d",
"floor1d", "bottom1d", "full", "facetleft", "facetright", "facettop", "facetbottom"),
to = NULL
)
x |
Numeric matrix or data.frame, first 2 columns and scaled and offset
the |
position |
Text specifying the position the axes should go to. Defaults to "center" expects one of: c("center", "left", "right", "bottomleft", "topright", "off", "full", "top1d", "floor1d", "bottom1d", "full", "facetleft", "facetright", "facettop", "facetbottom"). |
to |
Data.frame to scale to. Based on the min/max of the first 2 columns. If left NULL defaults to data.frame(x = c(0, 1), y = c(0, 1). |
Transformed values of x
, dimension and class unchanged.
map_absolute
for more manual control.
Other linear mapping functions:
map_absolute()
## !!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])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.