

The square is divided first into horizontal bars whose widths are proportional to the probabilities associated with the first categorical variable. The mosaic plot starts as a square with length one. An alternative is to use coloring based on correlations statistics. What is a mosaic plot A mosaic plot is a graphical display that allows you to examine the relationship among two or more categorical variables. The current implementation of MosaicPlot uses coloring of the rectangles for easier plot reading. In the mosaic plot you see that the first split is wrt gender with about 2/3 female and about 1/3 male. The function MosaicPlot has an interactive feature using Tooltip that gives a table with the exact co-occurrence (contingency) values when hovering with the mouse over the rectangles. Also, MosaicPlot takes all the options of Graphics (since it is based on it). The option “LabelRotation” specifies the rotation of the labels that correspond to the individual values of the variables. The options “ColumnNames” and “ColumnNamesOffset” are for the specification of the variable names (in blue in the plot). The option “Gap” used to regulate the gaps between the rectangle. With which the following mosaic plot was made: A good alternative set provided by ExampleData is, ImageSize -> 900] This is the reason that data set is used in this blog post. I implemented MosaicPlot while working on a document analyzing the census income data from 1998. I was impressed how informative mosaic plots are and I figured they can be relatively easily implemented using Prefix trees (also known as “Tries”). I have read the descriptions of mosaic plots in the book “R in Action” by Robert Kabakoff and one of the references provided in the book ( “What is a mosaic plot?” by Steve Simon). (Note, that if a column is numerical but has a small number of different values it can be seen as categorical.)
MOSAIC PLOT FULL
The list of records is assumed to be a full array and the columns to represent categorical values.
MOSAIC PLOT PDF
The function MosaicPlot summarizes the conditional probabilities of co-occurrence of the categorical values in a list of records of the same length. PDF Mosaic plots can help visualize contingency tables, even those complex ones, consisting of many categorical variables. A mosaic plot is a graphical representation of a two-way frequency table or contingency table. In general, for k variables, we can distinguish 2k + 1 log-linear models thus for three categorical variables we.
MOSAIC PLOT CODE
The document also has Mathematica code examples of usage and description of MosaicPlot‘s options.) using mosaic plots and log-linear models.

(Also see the document “Mosaic plots for data visualization” hosted at MathematicaForPrediction at GitHub. This blog post has description and examples of using the function MosaicPlot of the Mathematica package MosaicPlot.m provided by the project MathematicaForPrediction at GitHub. Mosaic is a 2017 murder mystery by Steven Soderbergh, producer Casey Silver, and writer Ed Solomon, published via HBO.It was released in two forms: as an iOS/Android mobile app and as a 2018 television drama.
