bin is an eroded
hexbin object, i.e.,
hboxplot() plots the high counts cells
erode(). 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
1 2 3 4
an object of class
global x- and y-axis plotting limits for multiple plots.
colors (“pen numbers”) for
plot limit expansion factor when
either 'on' or 'off' are the allowed arguments, when on everything is clipped to the plotting region.
logical value to reshape the plot although
x- and y- axis labels and main title
pen arguments correspond
polygon function calls for plotting two types of
cells. The cell types, pen numbers and suggested colors are
|cells of bin||2||light gray|
|last eroded cells of bin (median cells)||1||black|
The erode components of the hexbin objects must be present for the medians cells to plot.
xbnds is missing or
reshape is true, the plot
changes graphics parameters and resets them. When
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
hexViewport() used internally.
Used to add to the plot afterwards.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
## boxplot of smoothed counts x <- rnorm(10000) y <- rnorm(10000) bin <- hexbin(x,y) erodebin <- erode(smooth.hexbin(bin)) hboxplot(erodebin) hboxplot(erodebin, density = c(32,7), border = c(2,4)) hp <- hboxplot(erodebin, density = c(-1,17), main = "hboxplot(erode*(smooth*(.)))") pushHexport(hp) library("grid") grid.points(x[1:10], y[1:10])# just non-sense to show the principle popViewport()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.