{grid}R Documentation

Place an Object within a Frame


These functions provide a simpler (and faster) alternative to the grid.pack() and packGrob functions. They can be used to place objects within the existing rows and columns of a frame layout. They do not provide the ability to add new rows and columns nor do they affect the heights and widths of the rows and columns.

Usage, grob, row = 1, col = 1, redraw = TRUE)
placeGrob(frame, grob, row = NULL, col = NULL)


gPath A gPath object, which specifies a frame on the display list.
frame An object of class frame, typically the output from a call to grid.frame.
grob An object of class grob. The object to be placed.
row Which row to add the object to. Must be between 1 and the-number-of-rows-currently-in-the-frame.
col Which col to add the object to. Must be between 1 and the-number-of-cols-currently-in-the-frame.
redraw A boolean indicating whether the output should be updated.


placeGrob modifies the given frame grob and returns the modified frame grob. destructively modifies a frame grob on the display list (and redraws the display list if redraw is TRUE).


placeGrob returns a frame grob, but returns NULL.


Paul Murrell

See Also

grid.frame, grid.pack, grid.edit, and gPath.

[Package grid version 2.2.1 Index]