View source: R/npc_to_data_coord.R
npc_to_data_coord | R Documentation |
Convert NPC (Normalized Parent Coordinates) into data coordinates.
npc_to_data_coord(npc, data.ranges)
npc |
a numeric vector. Each value should be in [0-1] |
data.ranges |
a numeric vector of length 2 containing the data ranges (minimum and the maximum) |
a numeric vector representing data coordinates.
as_npc
, get_coord
.
npc_to_data_coord(npc = c(0.2, 0.95), data.ranges = c(1, 20)) as_npc(c("top", "right")) %>% npc_to_data_coord(data.ranges = c(1, 20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.