hexagons(bin, style="grayscale", cuts=16, col.regions=
trellis.par.get("regions")$col, at, mincount=1,
rmaxcount=max(bin$count), minarea=0.04, maxarea=0.8,
density=-1, border=F)
style="grayscale" A smoothly varying color mapping of the counts is determined from the values in cuts, at, and col.regions. The best use of this option requires that the plotting device is activated through a call to the S-PLUS function trellis.device. This ensures that an adequate color map is the default although other devices as well as customized colormaps can be provided by the user.
style="lattice" or "centroids" Plots the hexagons in sizes proportional to cell counts. The "lattice" option places the hexagons at the lattice centers. In some cases, the regularity of this structure may be visually overwhelming. In those cases, the user should use the "centroids" option which places the hexagons at their centers of mass. This results in the breaking of the regularity of the lattice structure thereby placing the focus on other properties of the data. In all cases the hexagons will not plot outside the cell unless maxarea > 1.
style="nested.lattice" and "nested.centroids" Two overlaying hexagons are plotted: a background hexagon with area covering the full hexagon's and color proportional to the cell count in powers of 10 and a foreground hexagon with area proportional to log10(count)-floor(log10(count)). When style="nested.centroids" counts <10 are plotted and the centers of the plotted hexagons are placed at their centers of mass. The outside color encodes hexagon size within color contours representing powers of 10. Different color schemes give different effects including 3-D illusions
The hexagon sizes are scaled proportionally to cell counts by scaling the counts between mincount and maxcount and then mapping to areas between minarea and maxarea.
The local background influences color interpretation. Having defined color breaks to focus attention on specific contours can help. See nested options.
# A better approach uses plot.hexbin(bin) and controls the plot shape bin <- hexbin(x,y) plot(range(bin$x),range(bin$y),type='n') hexagons(bin)