hboxplot {hexbin} | R Documentation |
Let bin1 be an hexbin object with an erode component. This routine plots the high counts cells selected by the erode function. By default the high counts cells contain 50 percent of the counts so analagous to the interquartile range. The function distinguishes the last cells eroded using color. These cells correspond to one definition of the bivariate median.
hboxplot(bin1, xbnds = bin1$xbnds, ybnds = bin1$ybnds, density = c(-1, -1), border = c(FALSE, FALSE), pen = c(2, 3), unzoom = 1.04, reshape = FALSE, xlab = "", ylab = "", ...)
bin1 |
an object of type hexbin |
xbnds |
global x-axis plotting limits for multiple plots. |
ybnds |
global y-axis plotting limits for multiple plots. |
density |
fill arguments to polygon() |
border |
border arguments to polygon() |
pen |
pen numbers for polygon() |
unzoom |
plot limit expansion factor when xbnds is missing |
reshape |
logical value to reshape the plot although xbnds and ybnds are present. |
xlab, ylab |
x- and y- axis labels passed to plot() . |
... |
additional arguments passed to plot() . |
The density
, border
, and pen
arguments correspond
to the polygon
function calls for plotting two types of
cells.
The cell types, pen numbers and suggested colors are
TYPE | PEN | COLOR |
cells of bin1 | 2 | light gray |
last eroded cells of bin1 (median cells) | 1 | black |
The erode components of the hexbin objects must be present for the medians cells to plot.
When xbnds
is missing or reshape
is true, the plot
changes graphics parameters and resets them. When xbnds
is
missing the function also zooms in based on the available data to
provide increased resolution.
The zoom used the hexagon cell centers. The unzoom argument backs off a bit so the whole hexagon will fit in the plot.
Hboxplot()
is used as a stand alone function, for producing separate
legends for hmatplot()
and for panels in
hmatplot()
.
If (missing(xbnds) $|$ reshape)screen.par else 'done'
see in hexagons
.
hexbin
, smooth.hexbin
, erode.hexbin
,
hcell2xy
, hcell
plot.hexbin
, hmatplot
,
hexagons
, hex.legend
# boxplot of smoothed counts x <- rnorm(10000) y <- rnorm(10000) bin <- hexbin(x,y) erodebin <- erode.hexbin(smooth.hexbin(bin)) hboxplot(erodebin)