Rev 78848 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/grid/man/grid.frame.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2020 R Core Team% Distributed under GPL 2 or later\name{grid.frame}\alias{grid.frame}\alias{frameGrob}\title{ Create a Frame for Packing Objects }\description{These functions, together with \code{grid.pack},\code{grid.place}, \code{packGrob}, and \code{placeGrob} are part of aGUI-builder-like interface to constructing graphical images.The idea is that you create a frame with this function thenuse \code{grid.pack} or whatever to pack/place objects into the frame.}\usage{grid.frame(layout=NULL, name=NULL, gp=gpar(), vp=NULL, draw=TRUE)frameGrob(layout=NULL, name=NULL, gp=gpar(), vp=NULL)}\arguments{\item{layout}{ A Grid layout, or NULL. This can be used to initialisethe frame with a number of rows and columns, with initial widthsand heights, etc. }\item{name}{ A character identifier. }\item{vp}{ An object of class \code{viewport}, or NULL. }\item{gp}{ An object of class \code{"gpar"}; typically the output froma call to the function \code{\link{gpar}}.}\item{draw}{ Should the frame be drawn. }}\details{Both functions create a frame grob (a graphical object describing aframe), but only \code{grid.frame()}draws the frame (and then only if \code{draw} is \code{TRUE}).Nothing will actually bedrawn, but it will put the frame on the display list, which meansthat the output will be dynamically updated as objects are packedinto the frame. Possibly useful for debugging.}\value{A frame grob. \code{grid.frame()} returns the value invisibly.}\author{ Paul Murrell }\seealso{\code{\link{grid.pack}}}\examples{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")}\keyword{dplot}