Multiple Bar Plot

DESCRIPTION:
Creates a plot of a matrix of bars that may have both height and width specified.

USAGE:
mulbar(width, height, rowlab = NULL, collab = NULL,
       gap = .2, density  =  0, barcol  =  <<see below>>,
       angle  =  0, ...)

REQUIRED ARGUMENTS:
width:
matrix of bar widths. All values must be positive, and missing values are not accepted.
height:
matrix of bar heights. Values may be negative. width and height must have the same number of rows and columns. Missing values are not accepted.

OPTIONAL ARGUMENTS:
rowlab:
vector of character strings for row labels.
collab:
vector of character strings for column labels.
gap:
minimum fraction of the plot used for all of the gaps between rows in a column, and for all of the gaps between columns in a row.
barcol:
Color numbers to use to determine the colors of the bars. It will be cyclically extended to the length of width. It defaults to the argument col if that is given, otherwise to par("col").
density:
Densities of lines (lines per inch) to use for filling the bars with hatch lines. It will be cyclically extended to the length of width. A density of 0 means not to fill the bars at all and a density of -1 means to fill the bars with solid color.
angle:
The angles of the hatching lines. This is ignored if densityis not positive. It will be cyclically extended to the length of width..

Graphical parameters may also be supplied as arguments to this function (see par). In addition, the high-level graphics arguments described under par and the arguments to title may be supplied to this function.


SIDE EFFECTS:
a plot is created of a number of bars arranged in the same number of rows and columns as height, and taking their size from width and height.

DETAILS:
Creates a multiple number of barplots arranged in the same number of rows and columns as the height argument. The size of each bar is determined by the width argument. The number of values in height and width must match.

SEE ALSO:
barplot , par , title .

EXAMPLES:
counts <- telsam.response[1:5,]
fit <- loglin(counts, list(1, 2), fit = T)$fit  # fit independence model
resid <- counts - fit
par(mar = c(7, 4.1, 4.1, 2))
mulbar(
      sqrt(fit),
      resid/sqrt(fit),
      collab = dimnames(telsam.response)[[2]],
      rowlab = dimnames(telsam.response)[[1]][1:5],
      ylab = "Interviewer",
      main = "Chi-Plot for Fit to Interviewer Data"
      )
mtext(side = 1, line = 3,
  "Height prop. to Signed Contribution to Chi Statistic")
mtext(side = 1, line = 4,
  "Width proportional to Root-Fitted Value")
mtext(side = 1, line = 5, "Area Proportional to Fitted Value")