Usage
mosaic(formula,data,color=TRUE,labelat=c(),xlab=c(),ylab=c(), magnification=1,equal=FALSE,inside=FALSE)
Arguments
formula
A standard R formula written as y~x, where y is the name of the variable playing the role of y and x is the name of the variable playing the role of x.
data
An optional argument giving the name of the data frame that contains x and y. If not specified, the function will use existing definitions in the parent environment.
color
TRUE or FALSE. If FALSE, plots are presented in greyscale. If TRUE, an intelligent color scheme is chosen to shade the plot.
labelat
a vector of factor levels of x to be labeled (in the case that you want only certain levels to be labeled)
xlab
Label of horizontal axis if you want something different that the name of the x variable
ylab
Label of vertical axis if you want something different that the name of the y variable
magnification
Magnification of the labels of the x variable. A number smaller than 1 shrinks everything. A number larger than 1 makes everything larger
equal
If FALSE, the bar widths are proportional to the frequency of the corresponding level. If TRUE, the bar widths are all equal (useful if there are many levels or some are extremely rare).
inside
If FALSE, labels are beneath the bars. If TRUE, labels are placed inside the bars and rotated (useful if the levels have long names)