dotchart                package:base                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",
              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 to be used.

   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.

    main: overall title for the plot.

    xlab: title for the x axis.

    ylab: title for the y axis.

     ...: 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:

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

_E_x_a_m_p_l_e_s:

     data(VADeaths)
     dotchart(VADeaths, main = "Death Rates in Virginia - 1940")
     dotchart(t(VADeaths), main = "Death Rates in Virginia - 1940")

