

_M_o_s_a_i_c _P_l_o_t_s

     mosaicplot(x, main = NA, sort = NA, off = NA, dir = NA, color = FALSE)

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

       x: a contingency table, with optional category labels
          specified in the `dimnames(x)' attribute.  The
          table is best created by the `table()' command,
          which produces an object of type array.

    main: character string for the mosaic title.

    sort: vector ordering of the variables, containing a
          permutation of the integers `1:length(dim(x))'
          (the default).

     off: vector of offsets to determine percentage spacing
          at each level of the mosaic (appropriate values
          are between 0 and 20, and the default is 10 at
          each level).  There should be one offset for each
          dimension of the contingency table.

     dir: vector of split directions (`"v"' for vertical and
          `"h"' for horizontal) for each level of the
          mosaic, one direction for each dimension of the
          contingency table.  The default consists of alter-
          nating directions, beginning with a vertical
          split.

   color: (`TRUE' or vector of integer colors) for color
          shading or (`FALSE', the default) for empty boxes
          with no shading.

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

     Plots a mosaic on the current graphics device.

_D_e_t_a_i_l_s:

     See Emerson (1998) for more information and a case
     study with television viewer data from Nielsen Media
     Research.

_A_u_t_h_o_r(_s):

     S-PLUS original by John Emerson emerson@stat.yale.edu.
     Slightly modified for R by KH.

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

     John W. Emerson (1998).  Mosaic displays in S-PLUS: a
     general implementation and a case study.  Statistical
     Computing and Graphics Newsletter, 9, 1, 1723.

     The home page of Michael Friendly (<URL:
     http://hotspur.psych.yorku.ca/SCS/friendly.html>) pro-
     vides information on various aspects of graphical
     methods for analyzing categorical data, including
     mosaic plots.

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

     Y <- table(trunc(3*runif(1000)), trunc(3*runif(1000)),
                trunc(5*runif(1000))-10, trunc(3*runif(1000)))
     dimnames(Y)[[2]] <- c("Cat", "Dog", "Horse")
     mosaicplot(Y, main = "Sample Mosaic", color = TRUE)

