powered by
This function can be used to move the box to a given position with editGrob changing the x and y value.
x
y
move_box(obj, x = NULL, y = NULL, pos_type = c("absolute", "relative"))
A box object with updated x and y coordinates.
A box object.
box
A unit element or a number that can be converted to npc, see unit.
npc
If the provided coordinates are absolute position the box will be moved to or it's a relative position to it's current.
absolute
relative
fg <- textbox(text = "This is a test") fg2 <- move_box(fg, 0.3, 0.3)
Run the code above in your browser using DataLab