banking               package:lattice               R Documentation

_B_a_n_k_i_n_g

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

     Calculates banking slope

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

     banking(dx, dy)

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

  dx, dy: vector of consecutive x, y differences. 

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

     'banking' is the banking function used when 'aspect = "xy"' in
     high level Trellis functions. It is usually not very meaningful
     except with 'xyplot'.  It considers the absolute slopes (based on
     'dx' and 'dy') and returns a value which when adjusted by the
     panel scale limits will make the median of the above absolute
     slopes correspond to a 45 degree line.

     This function was inspired by the discussion of banking in the
     documentation for Trellis Graphics available at Bell Labs' website
     (see 'Lattice'), but is most likely identical to an algorithm
     described by Cleveland et al (see below).  It is not clear (to the
     author) whether this is the algorithm used in S-PLUS.  Alternative
     banking rules, implemented as a similar function, can be used as a
     drop-in replacement by suitably modifying
     'lattice.options("banking")'.

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

     Deepayan Sarkar Deepayan.Sarkar@R-project.org

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

     Cleveland, William S.,  McGill, Marylyn E. and McGill, Robert
     (1988), "The Shape Parameter of a Two-variable Graph", _Journal of
     the American Statistical Association_, 83, 289-300

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

     'Lattice', 'xyplot'

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

     xyplot(sunspot.year ~ time(sunspot.year) | equal.count(time(sunspot.year)), 
            xlab = "", type = "l", aspect = "xy", strip = FALSE,
            scales = list(x = list(alternating = 2, relation = "sliced")),
            as.table = TRUE, main = "Yearly Sunspots")

