hexplot(formula, data=sys.parent(), panel=panel.hexbin, prepanel=prepanel.hexbin, xbins=30, shape=1, scales=list(), endpoints=range(x.value, na.rm = T), shingle.args=list(), shingle.fun="equal.count", ..., xlab=val$xlab, ylab=val$ylab, col.regions=trellis.par.get("regions")$col, colorkey, maxcount, xlim=range(na.rm = T, x), ylim=range(na.rm = T, y), call=match.call(), groups=NULL, subset=T)
y ~ x | g1 * g2 * ...
however the given variables
g1, g2, ...
may be omitted. The
x
and
y
values in formula should both be numeric.
data=
argument is included, objects in formula are not
searched for in the frame of the caller. Thus, if you write a function that calls a Trellis
routine and supplies the
data=
argument, no objects defined in your
function will be accessible, nor will arguments to your function be accessible. Regardless
of the
data=
argument, objects are always accessible if they
are on the database search list.
x
.
Same as the input value for
hexbin
.
Hexagons inner diameter equals diff(xlim)/xbins in x units.
xbins
, the number of bins in the x-direction. The default value
shape=1
makes the hexagons appear equal-sided when plotted.
shingle.fun
.
trellis.args
and
additional named arguments which are passed to the panel function,
panel.hexplot
by default.
trellis.device
will ensure that
a colormap close to adequate is used. See the DETAILS section for ways to select other colormaps.
color.key
, for creating the color key (or legend)
associated with the hexplot. This list is returned in the resulting Trellis object and may be used in subsequent
hexplot
calls to create comparable color keys.
"trellis"
, which is automatically plotted by
print.trellis
.
hexbin
as determined by
formula
,
data
and other arguments controlling
hexbinning. Includes a color key or legend.
A way to try different colormaps on Windows is by using the Options pull down menu in your graphics device driver and typing in your own color map in the Polygons widget. For smoothly varying colormaps, you may want to copy the Image colors into the Polygons slot.
On Unix systems see the helpfile for
heat.colors
, for example, to see how to create different colormaps.
Carr, D. B., Littlefield, R. J., Nicholson, W. L. and Littlefield, J. S. (1987). Scatterplot matrix techniques for large N. Journal American Statistical Association 83, 424-436.
Carr, D. B. (1991). Looking at large data sets using binned data plots. In Computing and Graphics in Statistics. A. Buja and P. Tukey, eds. Springer-Verlag, New York. pp. 7-39.
# no conditioning x = rnorm(10000) y = rnorm(10000) hexplot(y ~ x) # with conditioning grp = rep(1:4, 2500) hexplot(y ~ x | grp) # setting the color regions hexplot(y ~ x | grp, col.regions = heat.colors(10)) # different group of colors using hsv() hexplot(y ~ x | grp, col.regions = hsv(h=seq(0.1, 0.9, length=16), s=0.75, v=1)) # converting a numeric grouping variable numgrp = runif(10000) hexplot(y ~ x | equal.count(numgrp), col.regions = heat.colors(10)) # specifying the number of hexbins hexplot(y ~ x | equal.count(numgrp), col.regions = heat.colors(10), xbins = 50)