grid.show.viewport {grid} | R Documentation |
This function uses Grid graphics to draw a diagram of a Grid viewport.
grid.show.viewport(v, parent.layout = NULL, newpage = TRUE,
vp.ex = 0.8, border.fill="light grey",
vp.col="blue", vp.fill="light blue",
scale.col="red",
vp = NULL)
v |
A Grid viewport object. |
parent.layout |
A grid layout object. If this is not NULL and
the viewport given in |
newpage |
A logical value to indicate whether to move to a new page before drawing the diagram. |
vp.ex |
positive number, typically in |
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). |
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.
None.
Paul Murrell
## Diagram of a sample viewport
grid.show.viewport(viewport(x=0.6, y=0.6,
width=unit(1, "inches"), height=unit(1, "inches")))
grid.show.viewport(viewport(layout.pos.row=2, layout.pos.col=2:3),
grid.layout(3, 4))