showViewport {grid} | R Documentation |
Produces a graphical display of (by default) the current grid viewport tree. It is also possible to display only specific viewports. Each viewport is drawn as a rectangle and the leaf viewports are labelled with the viewport name.
showViewport(vp = NULL, recurse = TRUE, depth = NULL, newpage = FALSE, leaves = FALSE, col = rgb(0, 0, 1, 0.2), fill = rgb(0, 0, 1, 0.1), label = TRUE, nrow = 3, ncol = nrow)
vp |
If |
recurse |
Should the children of the specified viewport also be displayed? |
depth |
Only display viewports at the specified depth (may be a vector of depths). |
newpage |
Start a new page for the display? Otherwise, the viewports are displayed on top of the current plot. |
leaves |
Produce a matrix of smaller displays, with each leaf viewport in its own display. |
col |
The colour used to draw the border of the rectangle for each viewport and to draw the label for each viewport. If a vector, then the first colour is used for the top-level viewport, the second colour is used for its children, the third colour for their children, and so on. |
fill |
The colour used to fill each viewport. May be a vector as per
|
label |
Should the viewports be labelled (with the viewport name)? |
nrow, ncol |
The number of rows and columns when |
viewport
and
grid.show.viewport
showViewport(viewport(width=.5, height=.5)) showViewport(vpStack(viewport(width=.5, height=.5), viewport(width=.5, height=.5)), newpage=TRUE) showViewport(vpStack(viewport(width=.5, height=.5), viewport(width=.5, height=.5)), fill=rgb(1:0, 0:1, 0, .1), newpage=TRUE)