home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / piechart < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.9 KB  |  61 lines

  1.     
  2.     _P_i_e _C_h_a_r_t_s
  3.     
  4.          piechart(x, labels=names(x), shadow=FALSE,
  5.                  edges=200, radius=0.8, fill=NULL, main=NULL, ...)
  6.     
  7.     _A_r_g_u_m_e_n_t_s:
  8.     
  9.                x : a vector of positive quantities.  The values
  10.                    in x are displayed as the areas of pie
  11.                    slices.
  12.     
  13.           labels : a vector of character strings giving names
  14.                    for the slices.
  15.     
  16.           shadow : a logical vector indicating whether a shadow
  17.                    effect should be attempted for the chart.
  18.                    This only makes sense if the slices are
  19.                    filled with colors.
  20.     
  21.            edges : the circular outline of the pie is approxi-
  22.                    mated by a polygon with this many edges.
  23.     
  24.           radius : the pie is drawn centered in a square box
  25.                    whose sides range from -1 to 1.  If the char-
  26.                    acter strings labeling the slices are long it
  27.                    may be necessary to use a smaller radius.
  28.     
  29.              col : a vector of colors to be used in filling the
  30.                    slices.
  31.     
  32.             main : an overall title for the plot.
  33.     
  34.              ... : graphical parameters can be given as argu-
  35.                    ments to piechart.
  36.     
  37.     _D_e_s_c_r_i_p_t_i_o_n:
  38.     
  39.          Pie charts are a very bad way of displaying informa-
  40.          tion.  The eye is good at judging linear measures and
  41.          bad at judging relative areas.  A bar chart or dot
  42.          chart is a preferable way of displaying this type of
  43.          data.
  44.     
  45.     _S_e_e _A_l_s_o:
  46.     
  47.          dotplot.
  48.     
  49.     _E_x_a_m_p_l_e_s:
  50.     
  51.          piechart(rep(1,24), col=rainbow(24), radius=0.9)
  52.     
  53.          pie.sales <- c(0.12, 0.3, 0.26, 0.16, 0.04, 0.12)
  54.          names(pie.sales) <- c("Blueberry", "Cherry",
  55.              "Apple", "Boston Cream", "Other", "Vanilla Cream")
  56.          piechart(pie.sales,
  57.              col=c("purple", "violetred1", "green3",
  58.              "cornsilk", "cyan", "white")) piechart(pie.sales,
  59.              col=gray(seq(0.4,1.0,length=6)))
  60.     
  61.