hboxplot               package:hexbin               R Documentation

_2-_D _G_e_n_e_r_a_l_i_z_a_t_i_o_n _o_f _B_o_x_p_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     If 'bin1' is a 'hexbin' object with an 'erode' component.  Then,
     'hboxplot()' 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.

_U_s_a_g_e:

     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 = "", ...)

_A_r_g_u_m_e_n_t_s:

    bin1: an object of class 'hexbin'.

   xbnds: global x-axis plotting limits for multiple plots.

   ybnds: global y-axis plotting limits for multiple plots. 

density, border: arguments for 'polygon()' each of length two, the
          first for the median, the second for the other cells.

     pen: colors ("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()'.

_D_e_t_a_i_l_s:

     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()'.

_V_a_l_u_e:

     If (missing(xbnds) $|$ reshape)screen.par else 'done'

_R_e_f_e_r_e_n_c_e_s:

     see in 'hexagons'.

_S_e_e _A_l_s_o:

     'hexbin', 'smooth.hexbin', 'erode.hexbin', 'hcell2xy',  'hcell'
     'plot.hexbin', 'hmatplot', 'hexagons', 'hex.legend'

_E_x_a_m_p_l_e_s:

     ##  boxplot of smoothed counts
     x <- rnorm(10000)
     y <- rnorm(10000)

     bin <- hexbin(x,y)
     erodebin <- erode.hexbin(smooth.hexbin(bin))

     hboxplot(erodebin)
     hboxplot(erodebin, density = c(32,7), border = c(2,4))
     hboxplot(erodebin, density = c(-1,17),
              main = "hboxplot(erode*(smooth*(.)))")

