ternaryplot              package:Zelig              R Documentation

_T_e_r_n_a_r_y _d_i_a_g_r_a_m

_D_e_s_c_r_i_p_t_i_o_n:

     Visualizes compositional, 3-dimensional data in an equilateral
     triangle   (from the vcd library, Version 0.1-3.3, Date
     2004-04-21), using plot graphics.   Differs from implementation in
     vcd (0.9-7), which uses grid graphics.

_U_s_a_g_e:

     ternaryplot(x, scale = 1, dimnames = NULL, dimnames.position = c("corner","edge","none"),
                 dimnames.color = "black", id = NULL, id.color = "black", coordinates = FALSE,
                 grid = TRUE, grid.color = "gray", labels = c("inside", "outside", "none"),
                 labels.color = "darkgray", border = "black", bg = "white", pch = 19, cex = 1,
                 prop.size = FALSE, col = "red", main = "ternary plot", ...)

_A_r_g_u_m_e_n_t_s:

       x: a matrix with three columns.

   scale: row sums scale to be used.

dimnames: dimension labels (defaults to the column names of 'x').

dimnames.position, dimnames.color: position and color of dimension
          labels.

      id: optional labels to be plotted below the plot symbols.
          'coordinates' and 'id' are mutual exclusive.

id.color: color of these labels.

coordinates: if 'TRUE', the coordinates of the points are plotted below
          them. 'coordinates' and 'id' are mutual exclusive.

    grid: if 'TRUE', a grid is plotted. May optionally be a string
          indicating the line type (default: '"dotted"').

grid.color: grid color.

labels, labels.color: position and color of the grid labels.

  border: color of the triangle border.

      bg: triangle background.

     pch: plotting character. Defaults to filled dots.

     cex: a numerical value giving the amount by which plotting text
          and symbols should be scaled relative to the default. Ignored
          for the symbol size if 'prop.size' is not 'FALSE'.

prop.size: if 'TRUE', the symbol size is plotted proportional to the
          row sum of the three variables, i.e. represents the weight of
          the observation.

     col: plotting color.

    main: main title.

     ...: additional graphics parameters (see 'par')

_D_e_t_a_i_l_s:

     A points' coordinates are found by computing the gravity center of
     mass points using the data entries as weights. Thus, the
     coordinates of a point P(a,b,c), a + b + c = 1, are: P(b + c/2, c
     * sqrt(3)/2).

_A_u_t_h_o_r(_s):

     David Meyer
      david.meyer@ci.tuwien.ac.at

_R_e_f_e_r_e_n_c_e_s:

     M. Friendly (2000), _Visualizing Categorical Data_. SAS Institute,
     Cary, NC.

_S_e_e _A_l_s_o:

     'ternarypoints'

_E_x_a_m_p_l_e_s:

     data(mexico)
     if (require(VGAM)) { 
     z.out <- zelig(as.factor(vote88) ~ pristr + othcok + othsocok, 
                     model = "mlogit", data = mexico)
     x.out <- setx(z.out)
     s.out <- sim(z.out, x = x.out)

     ternaryplot(s.out$qi$ev, pch = ".", col = "blue",
                 main = "1988 Mexican Presidential Election")
     }

