gridExtra (version 0.7)

borderGrob: borderGrob

Description

an open rectangular borderdraw

Usage

borderGrob(type=1, colour="white", vp, ...)

Arguments

type
which borders to draw
colour
colour
...
additional arguments passed to gpar()
vp
viewport

Value

  • a grob

See Also

grid.segments, grid.points

Examples

Run this code
pushViewport(viewport(width=0.5, height=0.5, layout=grid.layout(4, 4, w=0.9, height=0.9)))
vp = viewport(width=0.9, height=0.9)
type <- 1
for(ii in 1:4){
for(jj in 1:4){
pushViewport(viewport(layout.pos.r=ii, layout.pos.c=jj))
grid.rect(gp=gpar(col="grey",fill="black"))
grid.text(paste("t = ", type), gp=gpar(col="white"))
grid.border(type, vp=vp)
upViewport()
type <- type + 1
}
}

Run the code above in your browser using DataCamp Workspace