hcell2xy {hexbin}R Documentation

Compute X and Y Coordinates for Hexagon Cells

Description

Computes x and y coordinates from hexagon cell id's.

Usage

hcell2xy(bin)

Arguments

bin a object of class "hexbin", typically produced by hexbin(*).

Details

The hexbin object contains all the needed information. The purpose of this function is to reduce storage. The cost is additional calculation.

Value

A list with two components of the same length as bin$cell,

x
y

References

see in hcell.

See Also

hcell, hray, hexbin.

Examples

x <- rnorm(10000)
y <- rnorm(10000)
plot(x,y, pch=".")
bin <- hexbin(x,y)
str(xys <- hcell2xy(bin))
points(xys, cex=1.5, col=2) ; title("hcell2xy( hexbin(..) )", col.main=2)



[Package hexbin version 1.0.10 Index]