Matrix Plot
plot_matrix(
object,
panel,
diag = TRUE,
upper = TRUE,
lower = TRUE,
freq = FALSE,
margin = 1,
scale = TRUE,
drop_zero = TRUE,
color = graphics::par("fg"),
midpoint = NULL,
axes = TRUE,
legend = TRUE,
asp = 1,
...
)
A \(m \times p\) numeric
matrix
or
data.frame
of count data (absolute frequencies giving the number of
individuals for each category, i.e. a contingency table).
A function
in the form function(x, y, z, color, ...)
which gives the action to be carried out in each panel of the display.
A logical
scalar indicating whether the diagonal of the
matrix should be plotted. Only used if object
is a symmetric matrix.
A logical
scalar indicating whether the upper triangle of
the matrix should be plotted. Only used if object
is a symmetric matrix.
A logical
scalar indicating whether the lower triangle of
the matrix should be plotted. Only used if object
is a symmetric matrix.
A logical
scalar indicating whether conditional proportions
given margins
should be used (i.e. entries of object
, divided by the
appropriate marginal sums).
An integer
vector giving the margins to split by:
1
indicates individuals/rows (the default), 2
indicates
variables/columns. Only used if freq
is TRUE
.
A logical
scalar indicating whether data should be rescaled
to \([-1,1]\). Only used if freq
if FALSE
.
A logical
scalar: should zeros be discarded?
A vector of colors or a function
that when called with a
single argument (an integer specifying the number of colors) returns a
vector of colors.
A numeric
value specifying the data midpoint.
A logical
scalar: should axes be drawn on the plot? It will
omit labels where they would abut or overlap previously drawn labels.
A logical
scalar: should a legend be displayed?
A length-one numeric
vector, giving the aspect ratio
\(y/x\).
Further arguments to be passed to panel
.