stripchart             package:graphics             R Documentation

_1-_D _S_c_a_t_t_e_r _P_l_o_t_s

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

     'stripchart' produces one dimensional scatter plots (or dot plots)
     of the given data.  These plots are a good alternative to
     'boxplot's when sample sizes are small.

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

     stripchart(x, method = "overplot", jitter = 0.1, offset = 1/3,
                vertical = FALSE, group.names, add = FALSE,
                at = NULL, xlim = NULL, ylim = NULL,
                main = "", ylab = "", xlab = "",
                log = "", pch = 0, col = par("fg"), cex = par("cex"))

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

       x: the data from which the plots are to be produced.  The data
          can be specified as a single vector, or as list of vectors,
          each corresponding to a component plot.  Alternatively a
          symbolic specification of the form 'x ~ g' can be given,
          indicating the the observations in the vector 'x' are to be
          grouped according to the levels of the factor 'g'. 'NA's are
          allowed in the data.

  method: the method to be used to separate coincident points. The
          default method '"overplot"' causes such points to be
          overplotted, but it is also possible to specify '"jitter"' to
          jitter the points, or '"stack"' have coincident points
          stacked.  The last method only makes sense for very granular
          data.

  jitter: when 'method="jitter"' is used, 'jitter' gives the amount of
          jittering applied.

  offset: when stacking is used, points are stacked this many
          line-heights (symbol widths) apart.

vertical: when vertical is 'TRUE' the plots are drawn vertically rather
          than the default horizontal.

group.names: group labels which will be printed alongside (or
          underneath) each plot.

     add: logical, if true _add_ the chart to the current plot.

      at: numeric vector giving the locations where the charts should
          be drawn, particularly when 'add = TRUE'; defaults to '1:n'
          where 'n' is the number of boxes.

xlim, ylim, main, ylab, xlab, log, pch, col, cex: Graphical parameters.

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

     Extensive examples of the use of this kind of plot can be found in
     Box, Hunter and Hunter or Seber and Wild.

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

     x <- rnorm(50)
     xr <- round(x, 1)
     stripchart(x) ; m <- mean(par("usr")[1:2])
     text(m, 1.04, "stripchart(x, \"overplot\")")
     stripchart(xr, method = "stack", add = TRUE, at = 1.2)
     text(m, 1.35, "stripchart(round(x,1), \"stack\")")
     stripchart(xr, method = "jitter", add = TRUE, at = 0.7)
     text(m, 0.85, "stripchart(round(x,1), \"jitter\")")

     with(OrchardSprays,
          stripchart(decrease ~ treatment,
                     main = "stripchart(Orchardsprays)", ylab = "decrease",
                     vertical = TRUE, log = "y"))

     with(OrchardSprays,
          stripchart(decrease ~ treatment, at = c(1:8)^2,
                     main = "stripchart(Orchardsprays)", ylab = "decrease",
                     vertical = TRUE, log = "y"))

