| Mplot {simone} | R Documentation |
Display the image of a matrix which may be rearranged according to an optional node classification vector.
Mplot(A = NULL, cl = NULL, ...)
A |
The matrix to display. If NULL, only the color legend
is displayed. |
cl |
Node classification vector. Default NULL. |
... |
See details section. |
Parameters can be specified in the call to Mplot to
change the color palette, the axis labels, and general parameters.
colorsrainbow, heat.colors,
terrain.colors, topo.colors, cm.colors are
available in R. Two grey palettes (grey and
inv-grey) and a light
spectrum-like palette (light) are provided in this
function. The number of color levels are chosen by adding ".x"
where x is the level number. Default "light.64". normalizeTRUE) A values are
normalized so that generated colors belong to interval
1:length(colors). If normalize = FALSE then the
normalization of the previous Mplot is used.
color.legendFALSE) Display the
color map.
Values of the axis labels are set to the row and column matrix
dimnames or indexes. Other parameters are:
lab.col.cex, lab.row.cexlab.col.pos, lab.row.pos"v" for vertical or "h" for
horizontal. Default "h".TRUE, diagonal terms are set to zero. marginmain, subplot arguments. Default NULL.
image and axis.
See these functions for more.No value is returned.
G. Grasseau, A. Smith, C. Ambroise
library(simone) # Simulate a data set with obvious structure p <- 200 n <- 1 proba.in <- 0.2 proba.out <- 0.01 alpha <- c(.5,.3,.2) X <- SimDataAffiliation (p, n, proba.in, proba.out, alpha) # Create four pictures par(mfrow=c(2,2)) Gplot(X$K.theo, X$cl.theo, main="Affiliation graph") Mplot(X$K.theo, main="Adjacency matrix", colors="light.64") Mplot(X$K.theo, X$cl.theo, lab.display=FALSE, main="Ordered matrix") Mplot(color.legend=TRUE)