grid.frame
and frameGrob
are part of a
GUI-builder-like interface to constructing graphical images.
The idea is that you create a frame with grid.frame
or
frameGrob
then
use this functions to pack objects into the frame.
grid.pack(gPath, grob, redraw = TRUE, side = NULL, row = NULL, row.before = NULL, row.after = NULL, col = NULL, col.before = NULL, col.after = NULL, width = NULL, height = NULL, force.width = FALSE, force.height = FALSE, border = NULL, dynamic = FALSE)
packGrob(frame, grob, side = NULL, row = NULL, row.before = NULL, row.after = NULL, col = NULL, col.before = NULL, col.after = NULL, width = NULL, height = NULL, force.width = FALSE, force.height = FALSE, border = NULL, dynamic = FALSE)
frame
, typically the output
from a call to grid.frame
. grob
. The object to be
packed. "left"
, "top"
, "right"
,
"bottom"
to indicate which side to pack the object on. NULL
in
which case the object occupies all rows. NULL
in
which case the object occupies all cols. grid.pack
OR the maximum of
that width and the pre-existing width. grid.pack
OR the maximum of
that height and the pre-existing height. unit
object of length 4 indicating the borders
around the object. packGrob
returns a frame grob, but grid.pack
returns
NULL
.
packGrob
modifies the given frame grob and returns the modified
frame grob. grid.pack
destructively modifies a frame grob on the display
list (and redraws the display list if redraw
is TRUE
).
These are (meant to be) very flexible functions. There are many different ways to specify where the new object is to be added relative to the objects already in the frame. The function checks that the specification is not self-contradictory.
NOTE that the width/height of the row/col that the object is added to
is taken from the object itself unless the width
/height
is specified.
grid.frame
,
grid.place
,
grid.edit
, and gPath
.