grid.hexagontile {hexDensity} | R Documentation |
Draw hexagon tiles with grid package
Description
Adapted from grid.hexagons by hexbin with speedup specific for hexagonal tiling (avoid plotting the most abundance hexagons by setting its color as background).
Usage
grid.hexagontile(
hexDensity,
use.count = TRUE,
cell.at = NULL,
trans = NULL,
colorcut = seq(0, 1, length = 1024),
colramp = colorRampPalette(col.viridis),
def.unit = "native"
)
Arguments
hexDensity |
hexbin object returned by hexDensity. |
use.count |
logical specifying if counts from hexbin object should be used. |
cell.at |
numeric vector to be plotted instead of counts, must be same length as the number of cells. |
trans |
a transformation function (or NULL) for the counts, e.g., sqrt. |
colorcut |
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]. |
colramp |
Color function that accept an integer n and return n colors. |
def.unit |
Default unit to be used. |
Value
No return value
SIDE EFFECTS
Adds hexagons to plot
Author(s)
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.