Adapted from grid.hexagons by hexbin with speedup specific for hexagonal tiling (avoid plotting the most abundance hexagons by setting its color as background).
grid.hexagontile(
hexDensity,
use.count = TRUE,
cell.at = NULL,
trans = NULL,
colorcut = seq(0, 1, length = 1024),
colramp = colorRampPalette(col.viridis),
def.unit = "native"
)
No return value
hexbin object returned by hexDensity.
logical specifying if counts from hexbin object should be used.
numeric vector to be plotted instead of counts, must be same length as the number of cells.
a transformation function (or NULL) for the counts, e.g., sqrt.
An integer for the number of equi-spaced colorcut in [0,1] to assign colors to values. Alternatively, a vector of custom colorcut spacing between [0, 1].
Color function that accept an integer n and return n colors.
Default unit to be used.
Adds hexagons to plot
Dan Carr <dcarr@voxel.galaxy.gmu.edu>; ported and extended by Nicholas Lewin-Koh nikko@hailmail.net. Modified by Quoc Hoang Nguyen <nguyen.q@wehi.edu.au> for hexDensity.