stars                  package:base                  R Documentation

_S_t_a_r _P_l_o_t_s _a_n_d _S_e_g_m_e_n_t _D_i_a_g_r_a_m_s _o_f _M_u_l_t_i_v_a_r_i_a_t_e _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Star plots or segment diagrams are created on the current graphics
     device.

_U_s_a_g_e:

     stars(x, full = TRUE, scale = TRUE, radius = TRUE, 
           labels = dimnames(x)[[1]],
           locations = NULL, xlim = NULL, ylim = NULL, len = 1,
           colors = NULL, key.loc = NULL, key.labels = NULL, key.xpd = TRUE,
           draw.segments = FALSE,
           axes = FALSE, cex = 0.8, lwd = 0.25, ...)

_A_r_g_u_m_e_n_t_s:

       x: matrix of data.  One segment plot will be produced for each
          row of the matrix.  Missing values (`NA') are allowed, but
          they are treated as if they were 0.

    full: logical flag: if `TRUE', the segment plots will occupy a full
          circle.  Otherwise, they occupy the (upper) semicircle only.

   scale: logical flag: if `TRUE', the columns of the data matrix are
          scaled independently so that the maximum value in each column
          is 1 and the minimum is 0.  If `FALSE', the presumption is
          that the data have been scaled by some other algorithm to the
          range [0,1].

  radius: logical flag: in `TRUE', the radii corresponding to each
          variable in the data will be drawn.

  labels: vector of character strings for labeling the plots. Unlike
          the S function `stars', no attempt is made to construct
          labels if `labels = NULL'.

locations: two column matrix with the x and y coordinates used to place
          each of the segment plots.  If `locations' is `NULL' the
          segment plots will be placed in a rectangular grid.

    xlim: vector with the range of x coordinates to plot. 

    ylim: vector with the range of y coordinates to plot.

     len: scale factor for the length of radii or segments.

  colors: vector of integers, each of which specifies  a color for one
          of the segments.  Ignored if `draw.segments = FALSE'

 key.loc: vector with x and y coordinates of the unit key.

key.labels: vector of character strings for labeling the segments of
          the unit key.  If omitted, the second component of
          `dimnames(x)' is used, if available.

 key.xpd: clipping switch for the unit key (drawing and labeling), see
          `par("xpd")'.

    axes: logical flag: if `TRUE' axes are added to the plot.

     cex: character expansion factor for the labels.

     lwd: line width used for drawing.

     ...: further arguments, passed to the first call of `plot()', see
          `plot.default'.

_D_e_t_a_i_l_s:

     Missing values are treated as 0.

     Each star plot or segment diagram represents one row of the input
     `x'.  Variables (columns) start on the right and wind
     counterclockwise around the circle.  The size of the (scaled)
     column is shown by the distance from the center to the point on
     the star or the radius of the segment representing the variable.

     Only one page of output is produced.

_N_o_t_e:

     This code started life as spatial star plots by David A. Andrews.
     See <URL:
     http://www.udallas.edu:8080/~andrews/software/software.html>.

_A_u_t_h_o_r(_s):

     Thomas S. Dye

_E_x_a_m_p_l_e_s:

     data(mtcars)
     stars(mtcars[, 1:7], key.loc = c(12, 2),
           main = "Motor Trend Cars", full = FALSE) 

     stars(mtcars[, 1:7], len = 0.8, key.loc = c(12, 1.5),
           main = "Motor Trend Cars", draw.segments = TRUE)

     data(USJudgeRatings)
     stars(USJudgeRatings, labels = abbreviate(case.names(USJudgeRatings)),
           key.loc = c(13, 1.5), main = "Judge not ...", len = 0.8)

