struc_mosaic               package:vcd               R Documentation

_C_o_r_e-_g_e_n_e_r_a_t_i_n_g _F_u_n_c_t_i_o_n _f_o_r _M_o_s_a_i_c _P_l_o_t_s

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

     Core-generating function for 'strucplot' returning a function
     producing mosaic plots.

_U_s_a_g_e:

     struc_mosaic(zero_size = 0.5, zero_split = FALSE, zero_shade = TRUE,
                  zero_gp = gpar(col = 0), panel = NULL)

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

zero_size: size of the bullets used for zero-entries in the contingency
          table (if 0, no bullets are drawn).

zero_split: logical controlling whether zero cells should be further
          split. If 'FALSE' and 'zero_shade' is 'FALSE', only one
          bullet is drawn (centered) for unsplit zero cells. If 'FALSE'
          and 'zero_shade' is 'TRUE', a bullet for each zero cell is
          drawn to allow, e.g., residual-based shadings to be effective
          also for zero cells.

zero_shade: logical controlling whether zero bullets should be shaded.

 zero_gp: object of class '"gpar"' used for zero bullets in case they
          are _not_ shaded.

   panel: Optional function with arguments: 'residuals', 'observed',
          'expected', 'index', 'gp', and 'name' called by the
          'struc_mosaic' workhorse for each tile that is drawn in the
          mosaic. 'index' is an integer vector with the tile's
          coordinates in the contingency table, 'gp' a 'gpar' object
          for the tile, and 'name' a label to be assigned to the drawn
          grid object.

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

     This function is usually called by 'strucplot' (typically when
     called by 'mosaic') and returns a function used by 'strucplot' to
     produce mosaic plots.

_V_a_l_u_e:

     A function with arguments: 

residuals: table of residuals.

observed: table of observed values.

expected: not used by 'struc_mosaic'.

 spacing: object of class '"unit"' specifying the space between the
          tiles.

      gp: list of 'gpar' objects used for the drawing the tiles.

split_vertical: vector of logicals indicating, for each dimension of
          the table, the split direction.

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

     David Meyer David.Meyer@R-project.org

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

     Cohen, A. (1980), On the graphical display of the significant
     components in a two-way contingency table. _Communications in
     Statistics-Theory and Methods_, *A9*, 1025-1041.

     Friendly, M. (1992), Graphical methods for categorical data. _SAS
     User Group International Conference Proceedings_, *17*, 190-200.
     <URL: http://www.math.yorku.ca/SCS/sugi/sugi17-paper.html>

     Meyer, D., Zeileis, A., and Hornik, K. (2006), The strucplot
     framework: Visualizing multi-way contingency tables with 'vcd'.
     _Journal of Statistical Software_, *17(3)*, 1-48. URL
     http://www.jstatsoft.org/v17/i03/ and available as 
     'vignette("strucplot")'.

_S_e_e _A_l_s_o:

     'mosaic', 'strucplot', 'structable'

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

     ## Titanic data
     data("Titanic")
     ## mosaic plot with large zeros
     strucplot(Titanic, core = struc_mosaic(zero_size = 1))

