hexpolygon {hexbin}R Documentation

Hexagon Coordinates and Polygon Drawing


Simple ‘low-level’ function for computing and drawing hexagons.


hexcoords(dx, dy = NULL, n = 1, sep = NA)
hexpolygon(x, y, hexC = hexcoords(dx, dy, n = 1), dx, dy = NULL, ...)


dx,dy horizontal and vertical width of the hexagon(s).
n number of hexagon “repeats”.
sep separator value to be put between coordinates of different hexagons.
x,y numeric vectors of the same length specifying the hexagon centers around which to draw.
hexC a list with components x and y, see the default value.
... further arguments passed to polygon.


hexcoords returns a list with two components

x,y numeric vectors of length n * 7 (or n * 6 if sep=NULL) specifying the hexagon polygon coordinates (with sep appended to 6-tuple).

hexpolygon returns whatever its polygon(.) call returns.


Martin Maechler

See Also

hexagons which builds on these.



[Package hexbin version 1.0.10 Index]