powered by
Retrieves the distance between two boxes as absolute "mm" units.
"mm"
distance(box1, box2, type = c("vertical", "horizontal"), half = FALSE)
The first boxGrob
The second boxGrob
Wheter we should retrieve the vertical or horizontal difference
If set to true it returns half the distance. This is convenient when postioning boxes between eachother.
a unit with "mm"
# NOT RUN { box1 <- boxGrob("A test box", y=.8) box2 <- boxGrob("Another test box", y=.2) distance(box1, box2, "v") # }
Run the code above in your browser using DataLab