
Last chance! 50% off unlimited learning
Sale ends in
grid.pack
,
grid.place
, packGrob
, and placeGrob
are part of a
GUI-builder-like interface to constructing graphical images.
The idea is that you create a frame with this function then
use grid.pack
or whatever to pack/place objects into the frame.grid.frame(layout=NULL, name=NULL, gp=gpar(), vp=NULL, draw=TRUE)
frameGrob(layout=NULL, name=NULL, gp=gpar(), vp=NULL)
viewport
, or NULL. gpar
; typically the output from
a call to the function gpar
.grid.frame()
returns the value invisibly.grid.frame()
draws the frame (and then only if draw
is TRUE
).
Nothing will actually be
drawn, but it will put the frame on the display list, which means
that the output will be dynamically updated as objects are packed
into the frame. Possibly useful for debugging.grid.pack
grid.newpage()
grid.frame(name="gf", draw=TRUE)
grid.pack("gf", rectGrob(gp=gpar(fill="grey")), width=unit(1, "null"))
grid.pack("gf", textGrob("hi there"), side="right")
Run the code above in your browser using DataLab