A grid layout object. If this is not NULL and
the viewport given in v has its location specified relative
to the layout, then the diagram shows the layout and which cells
v occupies within the layout.
newpage
A logical value to indicate whether to move to
a new page before drawing the diagram.
vp.ex
positive number, typically in (0,1], specifying the
scaling of the layout.
border.fill
Colour to fill the border margin.
vp.col
Colour for the border of the viewport region.
vp.fill
Colour to fill the viewport region.
scale.col
Colour to draw the viewport axes.
vp
A Grid viewport object (or NULL).
Details
A viewport is created within vp to provide a margin for
annotation, and the diagram is drawn within that new viewport.
By default, the margin is filled with light grey, the new viewport is filled
with white and framed with a black border, and the viewport region
is filled with light blue and framed with a blue border.
The diagram is annotated with the width and height (including units)
of the viewport, the (x, y) location of the viewport, and
the x- and y-scales of the viewport, using red lines and text.
Value
None.
Author(s)
Paul Murrell
See Also
Grid,
viewport
Examples
## Diagram of a sample viewport
grid.show.viewport(viewport(x=0.6, y=0.6,
w=unit(1, "inches"), h=unit(1, "inches")))
grid.show.viewport(viewport(layout.pos.row=2, layout.pos.col=2:3),
grid.layout(3, 4))
Results
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/grid.show.viewport.Rd_%03d_medium.png", width=480, height=480)
> ### Name: grid.show.viewport
> ### Title: Draw a Diagram of a Grid Viewport
> ### Aliases: grid.show.viewport
> ### Keywords: dplot
>
> ### ** Examples
>
> ## Diagram of a sample viewport
> grid.show.viewport(viewport(x=0.6, y=0.6,
+ w=unit(1, "inches"), h=unit(1, "inches")))
> grid.show.viewport(viewport(layout.pos.row=2, layout.pos.col=2:3),
+ grid.layout(3, 4))
>
>
>
>
>
> dev.off()
null device
1
>