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.
If NULL, the current viewport tree is displayed.
Otherwise, a viewport (or vpList, or vpStack, or vpTree) or
a vpPath that specifies which viewport to display.
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
col.
label
Should the viewports be labelled (with the viewport name)?
nrow, ncol
The number of rows and columns when leaves is TRUE.
Otherwise ignored.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(grid)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/grid/showViewport.Rd_%03d_medium.png", width=480, height=480)
> ### Name: showViewport
> ### Title: Display grid viewports.
> ### Aliases: showViewport
> ### Keywords: dplot
>
> ### ** Examples
>
> showViewport(viewport(width=.5, height=.5, name="vp"))
>
> grid.newpage()
> pushViewport(viewport(width=.5, height=.5, name="vp"))
> upViewport()
> showViewport(vpPath("vp"))
>
> showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
+ viewport(width=.5, height=.5, name="vp2")),
+ newpage=TRUE)
>
> showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
+ viewport(width=.5, height=.5, name="vp2")),
+ fill=rgb(1:0, 0:1, 0, .1),
+ newpage=TRUE)
>
>
>
>
>
> dev.off()
null device
1
>