dotchart              package:graphics              R Documentation

_C_l_e_v_e_l_a_n_d _D_o_t _P_l_o_t_s

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

     Draw a Cleveland dot plot.

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

     dotchart(x, labels = NULL, groups = NULL, gdata = NULL,
              cex = par("cex"), pch = 21, gpch = 21, bg = par("bg"),
              color = par("fg"), gcolor = par("fg"), lcolor = "gray",
              xlim = range(x[is.finite(x)]),
              main = NULL, xlab = NULL, ylab = NULL, ...)

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

       x: either a vector or matrix of numeric values ('NA's are
          allowed).  If 'x' is a matrix the overall plot consists of
          juxtaposed dotplots for each row.

  labels: a vector of labels for each point. For vectors the default is
          to use 'names(x)' and for matrices the row labels
          'dimnames(x)[[1]]'.

  groups: an optional factor indicating how the elements of 'x' are
          grouped. If 'x' is a matrix, 'groups' will default to the
          columns of 'x'.

   gdata: data values for the groups. This is typically a summary such
          as the median or mean of each group.

     cex: the character size to be used.  Setting 'cex' to a value
          smaller than one can be a useful way of avoiding label
          overlap.

     pch: the plotting character or symbol to be used.

    gpch: the plotting character or symbol to be used for group values.

      bg: the background color of plotting characters or symbols to be
          used; use 'par(bg= *)' to set the background color of the
          whole plot.

   color: the color(s) to be used for points an labels.

  gcolor: the single color to be used for group labels and values.

  lcolor: the color(s) to be used for the horizontal lines.

    xlim: horizontal range for the plot, see 'plot.window', e.g.

    main: overall title for the plot, see 'title'.

xlab, ylab: axis annotations as in 'title'.

     ...: graphical parameters can also be specified as arguments.

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

     This function is invoked for its side effect, which is to produce
     two variants of dotplots as described in Cleveland (1985).

     Dot plots are a reasonable substitute for bar plots.

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

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

     Cleveland, W. S. (1985) _The Elements of Graphing Data._ Monterey,
     CA: Wadsworth.

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

     dotchart(VADeaths, main = "Death Rates in Virginia - 1940")
     op <- par(xaxs="i")# 0 -- 100%
     dotchart(t(VADeaths), xlim = c(0,100),
              main = "Death Rates in Virginia - 1940")
     par(op)

