

mosaicplot {base}                            R Documentation

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

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

     Plots a mosaic on the current graphics device.

_U_s_a_g_e_:

     mosaicplot(x, ...)
     mosaicplot.default(X, main = NULL, xlab = NULL, ylab = NULL,
                        sort = NULL, off = NULL, dir = NULL,
                        color = FALSE)
     mosaicplot.formula(formula, data = NULL, subset, na.action, ...)

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

     This is a generic function.  It currently has a default
     method (`mosaicplot.default') and a formula interface
     (`mosaicplot.formula').

     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_:

     Hartigan, J.A., and Kleiner, B. (1984).  A mosaic of
     television ratings. The American Statistician, 38,
     32-35.

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

     Friendly, M. (1994).  Mosaic displays for multi-way
     contingency tables.  Journal of the American Statisti-
     cal Association, 89, 190-200.

     The home page of Michael Friendly (<URL: http://hot-
     spur.psych.yorku.ca/SCS/friendly.html>) provides infor-
     mation on various aspects of graphical methods for ana-
     lyzing categorical data, including mosaic plots.

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

     ## FIXME: Use interesting data!

     ## Artificial 4-way table
     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)

     ## FIXME: Provide an example for the formula interface

