dotPlot                 package:BHH2                 R Documentation

_D_o_t _p_l_o_t: _s_c_a_t_t_e_r _p_l_o_t _w_i_t_h _s_t_a_c_k_e_d _d_o_t_s _s_i_m_i_l_a_r _t_o _t_h_e _s_t_e_m-_a_n_d-_l_e_a_f _p_l_o_t

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

     Displays an one-dimensional scatter plot with stacking similar to
     stem-and-leaf plot or histograms.

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

     dotPlot(x, y = 0, xlim = range(x,na.rm=TRUE), xlab = NULL, 
         scatter = FALSE, hmax = 1, base = TRUE, axes = TRUE, frame = FALSE, 
         pch = 21, pch.size = "x", labels = NULL, hcex = 1, cex =par("cex"), 
         cex.axis = par("cex.axis"),...)

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

       x: numeric vector to be displayed.

       y: numeric. Height of the basis of the plot.

    xlim: numeric. Range of the x axis.

    xlab: character string. label for the horizontal axis.

 scatter: logical. If TRUE a one-dimensional scatter plot of x, similar
          to 'rug', is displayed at the base of the plot.

    hmax: numeric. Height of the highest dot. 'hmax=1' as default. See
          *Details*.

    base: logical. If 'TRUE' (default) a base line for the dots
          (characters) is displayed.

    axes: logical. If 'TRUE' labelled axis is displayed.

   frame: logical. If 'FALSE' the plot frame is omitted.

     pch: numeric or character. Character number or character to be
          used for the display.

pch.size: numeric. Character to be used to distribute the "dots"
          ('pch'). See *Details*.

  labels: character vector. If 'NULL' (default) each point (dot) is
          displayed using character 'pch', otherwise vector 'labels' is
          used for the display. See *Details*.

    hcex: numeric. Expansion (shrink) factor for character height. See
          *Details*.

     cex: numeric. Expansion factor used for character display. See
          'par'.

cex.axis: numeric. Expansion factor used in case of labelling the axis.

     ...: additional graphical parameters.

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

     Basically function 'dotPlot' calls function dots to display a
     stacked one-dimensional scatter plot within vertical limits 0 and
     1. See 'dots' for more details.

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

     The function is called for its side effect which is to produce
     one-dimensional scatter plot with stacking as described, for
     example, in Chambers et al. (1983) It returns invisible a data
     frame with the actual coordinates (in users units).

_N_o_t_e:

     Since the dots are stacked vertically, their alignment is subject
     to rounding errors. Dots may be slightly moved in either side from
     their actual value.

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

     Ernesto Barrios

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

     Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A.
     (1983) _ Graphical Methods for Data Analysis._ New York: Chapman &
     Hall

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

     'dots', 'stem','hist','dotchart'

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

     library(BHH2)
     data(tab03B1)
     attach(tab03B1)
     stem(yield) #stem-leaf plot
     plt <- dotPlot(yield) # equivalent dotPlot

     # same dot plot with max and min observations labelled
     plt <- dotPlot(yield,xlim=c(75,95),xlab="yield",pch.size="x",hcex=1)
     text(c(min(yield),max(yield),80),rep(0.05,3),c("min","max",80))
     segments(80,min(plt$y),80,max(plt$y),lty=2)
     detach()

