panel.smoothScatter package:lattice R Documentation _L_a_t_t_i_c_e _p_a_n_e_l _f_u_n_c_t_i_o_n _a_n_a_l_o_g_o_u_s _t_o _s_m_o_o_t_h_S_c_a_t_t_e_r _D_e_s_c_r_i_p_t_i_o_n: This function allows the user to place 'smoothScatter' plots in lattice graphics. _U_s_a_g_e: panel.smoothScatter(x, y = NULL, nbin = 64, cuts = 255, bandwidth, colramp, nrpoints = 100, transformation = function(x) x^0.25, pch = ".", cex = 1, col="black", range.x, ..., subscripts) _A_r_g_u_m_e_n_t_s: x: Numeric vector containing x-values or n by 2 matrix containing x and y values. y: Numeric vector containing y-values (optional). The length of 'x' must be the same as that of 'y'. nbin: Numeric vector of length 1 (for both directions) or 2 (for x and y separately) containing the number of equally spaced grid points for the density estimation. cuts: number of cuts defining the color gradient bandwidth: Numeric vector: the smoothing bandwidth. If missing, these functions come up with a more or less useful guess. This parameter then gets passed on to the function 'bkde2D'. colramp: Function accepting an integer 'n' as an argument and returning 'n' colors. nrpoints: Numeric vector of length 1 giving number of points to be superimposed on the density image. The first 'nrpoints' points from those areas of lowest regional densities will be plotted. Adding points to the plot allows for the identification of outliers. If all points are to be plotted, choose 'nrpoints = Inf'. transformation: Function that maps the density scale to the color scale. pch, cex: graphical parameters for the 'nrpoints' "outlying" points shown in the display range.x: see 'bkde2D' for details. col: 'points' color parameter ...: Further arguments that are passed on to 'panel.levelplot'. subscripts: ignored, but necessary for handling of ... in certain situations. Likely to be removed in future. _D_e_t_a_i_l_s: This replicates the display part of the 'smoothScatter' function by replacing standard graphics calls by grid-compatible ones. _V_a_l_u_e: The function is called for its side effects, namely the production of the appropriate plots on a graphics device. _A_u_t_h_o_r(_s): Deepayan Sarkar deepayan.sarkar@r-project.org _E_x_a_m_p_l_e_s: ddf <- as.data.frame(matrix(rnorm(40000), ncol = 4) + 3 * rnorm(10000)) ddf[, c(2,4)] <- (-ddf[, c(2,4)]) xyplot(V1 ~ V2 + V3, ddf, outer = TRUE, panel = panel.smoothScatter, aspect = "iso") splom(ddf, panel = panel.smoothScatter, nbin = 64)