Examples for 'grid::grid.layout'


Create a Grid Layout

Aliases: grid.layout

Keywords: dplot

### ** Examples

## A variety of layouts (some a bit mid-bending ...)
layout.torture()
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
plot of chunk example-grid-grid.layout-1
## Demonstration of layout justification
grid.newpage()
testlay <- function(just="centre") {
  pushViewport(viewport(layout=grid.layout(1, 1, widths=unit(1, "inches"),
                          heights=unit(0.25, "npc"),
                          just=just)))
  pushViewport(viewport(layout.pos.col=1, layout.pos.row=1))
  grid.rect()
  grid.text(paste(just, collapse="-"))
  popViewport(2)
}
testlay()
testlay(c("left", "top"))
testlay(c("right", "top"))
testlay(c("right", "bottom"))
testlay(c("left", "bottom"))
testlay(c("left"))
testlay(c("right"))
testlay(c("bottom"))
testlay(c("top"))
plot of chunk example-grid-grid.layout-1

[Package grid version 4.2.3 Index]