move_box: Move a box grob

Description Usage Arguments Value Examples

View source: R/move_box.R

Description

This function can be used to move the box to a given position with editGrob changing the x and y value.

Usage

1
move_box(obj, x = NULL, y = NULL, pos_type = c("absolute", "relative"))

Arguments

obj

A box object.

x

A unit element or a number that can be converted to npc, see unit.

y

A unit element or a number that can be converted to npc, see unit.

pos_type

If the provided coordinates are absolute position the box will be moved to or it's a relative position to it's current.

Value

A box object with updated x and y coordinates.

Examples

1
2
fg <- textbox(text = "This is a test")
fg2 <- move_box(fg, 0.3, 0.3)

consort documentation built on Dec. 21, 2021, 1:06 a.m.