Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: plot

Quantlet: plotmosaic
Description: Graphical Contingency Table

Usage: plotmosaic(inX {,inY})
Input:
inX n x 1 Vector, discrete.
inY n x 1 Vector, discrete.

Note:

Example:

library("plot")

library("stats")

x1 = #("one", "one", "one", "one", "one", "one", "one", "one")

x1 = x1 | #("two", "two", "two", "two", "two", "two", "three")

x1 = x1 | #("three", "three", "three")

y1 = #("one", "one", "two", "two", "three", "three", "four")

y1 = y1 | #("four", "one", "one", "one", "two", "two", "two")

y1 = y1 | #("one", "four", "four", "four")

plotmosaic(x1, y1)

x2 = #(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3)

y2 = #(1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 1, 2, 2, 2, 1, 4, 4, 4)

plotmosaic(x2, y2)

Result:

Both calls of plotmosaic() generate a mosaic plot of x and y.

Note how the different orderings (alphabetical) influence

the appearence of the plot.


Library: plot

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Stephan R. W. Lauer, 990302
(C) MD*TECH Method and Data Technologies, 21.9.2000