borderGrob: borderGrob

Description Usage Arguments Value See Also Examples

View source: R/borderGrob.r

Description

an open rectangular borderdraw

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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
}
}

gridExtra documentation built on May 2, 2019, 4:59 p.m.