powered by
Convert NPC (Normalized Parent Coordinates) into data coordinates.
npc_to_data_coord(npc, data.ranges)
a numeric vector representing data coordinates.
a numeric vector. Each value should be in [0-1]
a numeric vector of length 2 containing the data ranges (minimum and the maximum)
as_npc, get_coord.
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))
Run the code above in your browser using DataLab