strucplot
returning a function
producing mosaic plots.
struc_mosaic(zero_size = 0.5, zero_split = FALSE, zero_shade = TRUE, zero_gp = gpar(col = 0), panel = NULL)
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."gpar"
used
for zero bullets in case they are not shaded.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.strucplot
(typically
when called by mosaic
) and returns a function used by
strucplot
to produce mosaic plots.
Friendly, M. (1992), Graphical methods for categorical data. SAS User Group International Conference Proceedings, 17, 190--200. http://datavis.ca/papers/sugi/sugi17.pdf
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")
.
mosaic
,
strucplot
,
structable
## Titanic data
data("Titanic")
## mosaic plot with large zeros
strucplot(Titanic, core = struc_mosaic(zero_size = 1))
Run the code above in your browser using DataLab