# If npc is specified, it is converted into data coordinates
get_coord(data.ranges = c(2, 20), npc = "left")
get_coord(data.ranges = c(2, 20), npc = 0.1)
# When coord is specified, no transformation is performed
# because this is assumed to be a data coordinate
get_coord(coord = 5)
# For grouped plots
res_top <- get_coord(
data.ranges = c(4.2, 36.4), group = c(1, 2, 3),
npc = "top", step = -0.1, margin.npc = 0
)
res_top
Run the code above in your browser using DataLab