hexpolygon {hexbin}R Documentation

Hexagon Coordinates and Polygon Drawing

Description

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

Usage

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

Arguments

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.

Value

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.

Author(s)

Martin Maechler

See Also

hexagons which builds on these.

Examples

  hexcoords(1)

[Package hexbin version 1.0.10 Index]