visHexGrid: Function to visualise a supra-hexagonal grid

Description Usage Arguments Value Note See Also Examples

View source: R/visHexGrid.r

Description

visHexGrid is supposed to visualise a supra-hexagonal grid

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
visHexGrid(
hbin,
area.size = 1,
border.color = NULL,
fill.color = NULL,
lty = 1,
lwd = 1,
lineend = "round",
linejoin = "round"
)

Arguments

hbin

an object of class "hexbin"

area.size

an inteter or a vector specifying the area size of each hexagon

border.color

the border color for each hexagon

fill.color

the filled color for each hexagon

lty

the line type for each hexagon. 0 for 'blank', 1 for 'solid', 2 for 'dashed', 3 for 'dotted', 4 for 'dotdash', 5 for 'longdash', 6 for 'twodash'

lwd

the line width for each hexagon

lineend

the line end style for each hexagon. It can be one of 'round', 'butt' and 'square'

linejoin

the line join style for each hexagon. It can be one of 'round', 'mitre' and 'bevel'

Value

invisible

Note

none

See Also

visHexComp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 1) generate an iid normal random matrix of 100x10 
data <- matrix( rnorm(100*10,mean=0,sd=1), nrow=100, ncol=10)
colnames(data) <- paste(rep('S',10), seq(1:10), sep="")

# 2) sMap resulted from using by default setup
sMap <- sPipeline(data=data)

# 3) create an object of "hexbin" class from sMap
dat <- data.frame(sMap$coord)
xdim <- sMap$xdim
ydim <- sMap$ydim
hbin <- hexbin::hexbin(dat$x, dat$y, xbins=xdim-1,
shape=sqrt(0.75)*ydim/xdim)

# 4) visualise hbin object
vp <- hexbin::hexViewport(hbin)
visHexGrid(hbin)

hfang-bristol/supraHex documentation built on May 24, 2021, 3:13 p.m.