BinnedScatter           package:aroma.core           R Documentation

_T_h_e _B_i_n_n_e_d_S_c_a_t_t_e_r _c_l_a_s_s

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

     Package:  aroma.core 
      *Class BinnedScatter*

     'list'
      '~~|'
      '~~+--''BinnedScatter'

     *Directly known subclasses:*


     public class *BinnedScatter*
      extends list

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

     BinnedScatter(data=NULL, density=NULL, map=NULL, params=NULL)

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

    data: A Nx2 @numaric 'matrix'.

 density: ...

     map: ...

  params: A 'list' of parameters.

     ...: Not used.

_F_i_e_l_d_s _a_n_d _M_e_t_h_o_d_s:

     *Methods:*

         'plot'       -
         'points'     -
         'reorder'    -
         'subsample'  -
         'subset'     -

     *Methods inherited from list*:
      all.equal, as.CopyNumberDataSetTuple, as.data.frame,
     attachLocally, averageQuantile, callHooks, listToXml,
     mergeBoxplotStats, normalizeAverage, normalizeQuantileRank,
     normalizeQuantileSpline, plotDensity, relist, within

_A_u_t_h_o_r(_s):

     Henrik Bengtsson (<URL: http://www.braju.com/R/>)

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

     The spatial density is estimated by internal functions of the
     'smoothScatter' package.

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

     # Sample scatter data
     n <- 10e3
     x <- rnorm(n=n)
     y <- rnorm(n=n)
     xy <- cbind(x=x, y=sin(x)+y/5)

     # Bin data and estimate densities
     xyd <- binScatter(xy)

     layout(matrix(1:4, nrow=2))
     par(mar=c(5,4,2,1))

     # Plot data
     plot(xyd, pch=1)

     # Thin scatter data by subsampling
     rhos <- c(1/3, 1/4, 1/6)
     for (kk in seq(along=rhos)) {
       xyd2 <- subsample(xyd, size=rhos[kk])
       points(xyd2, pch=1, col=kk+1)
     }

     for (kk in seq(along=rhos)) {
       xyd2 <- subsample(xyd, size=rhos[kk])
       plot(xyd2, pch=1, col=kk+1)
       mtext(side=3, line=0, sprintf("Density: %.1f%%", 100*rhos[kk]))
     }

