powered by
Plot a mosaic plot custom built for a particular figure.
MosaicPlot( formula, data, col = "#00000022", border = 1, dir = c("v", "h"), off = 0.01, cex.axis = 0.7, col.dir = "v", flip = c("v"), ... )
Formula describing the variable relationship.
Data frame for the variables, optional.
Colors for plotting.
Ignored.
Fraction of white space between each box in the plot.
Axis label size.
Direction to lay out colors.
Whether to flip the ordering of the vertical ("v") and/or horizontal ("h") ordering in the plot.
"v"
"h"
David Diez
data(email) data(COL) email$spam <- ifelse(email$spam == 0, "not\nspam", "spam") MosaicPlot(number ~ spam, email, col = COL[1:3], off = 0.02)
Run the code above in your browser using DataLab