erode.hexbin(bin, cdfcut=0.5)
"hexbin"
.
cdfcut=0.
"hexbin"
with high count cells and a component
named
erode
which gives the erosion order.
The algorithm performs gray-level erosion on the extracted cells.
Each erosion cycle removes counts from cells. The counts removed
for each cell are a multiple of the cell's exposed-face count. The algorithm
chooses the multiple so that at least one cell will be empty or have
a count deficit on each erosion cycle.
The
erode
component of the resulting object (a data frame) contains an
erosion number for each cell. The value of
erode
is six times the
erosion cycle at cell removal minus the cell deficit at removal.
Cells with low values are eroded first. The cell with the highest erosion
number is a candidate bivariate median. A few ties in
erode
are common.
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.
bin <- hexbin(rnorm(500),rnorm(500)) smbin <- smooth.hexbin(bin) erobin <- erode.hexbin(smbin) # Show erosion order screenpar <- plot(erobin, style="lat", minarea=1, maxarea=1, density=0, border=T) oldpar <- par(screenpar) # Reset graphical parameters xy <- cell2xy(erobin) text(xy$x,xy$y,as.character(erobin$erode)) par(oldpar) # Restore old graphical parameters