plotCM | R Documentation |
This function can be used to make an image of a clique matrix
(or any other 0-1 matrix). It is basically just the function
image
, with some pre-defined settings.
plotCM(cm, col=c("white","black"), at.x=NULL, at.y=NULL, xlab="Observation rectangles", ylab="Maximal intersections", main="", sub="")
cm |
A mxn clique matrix, where m is the number of maximal intersections, and n is the number of observation rectangles. The (i,j)th element is 1 if the ith maximal intersection is contained in the jth observation rectangle, and it is 0 otherwise. |
col |
Colors to be used. The default value is c("white","black"). |
at.x |
The points at which tick-marks are to be drawn along the
x-axis. The default value is NULL, meaning that tickmark locations
are computed automatically. See also the documentation of
|
at.y |
The points at which tick-marks are to be drawn along the
y-axis. The default value is NULL, meaning that tickmark locations
are computed automatically. See also the documentation of
|
xlab |
Label for the x-axis. The default value is "Observation rectangles". |
ylab |
Label for the y-axis. The default value is "Maximal intersections". |
main |
Title of the plot. The default value is empty. |
sub |
Sub-title of the plot. The default value is empty. |
No value is returned.
Marloes Maathuis: maathuis@stat.math.ethz.ch
reduc
# Load example data and plot observation rectangles data(ex) par(mfrow=c(2,1)) plotRects(ex,main="Rectangles and maximal intersections") # Perform reduction step and plot maximal intersections (shaded) res<-reduc(ex, cm=TRUE) plotRects(res$rects, density=15, border=NA, add=TRUE) # Plot clique matrix plotCM(res$cm, main="Clique matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.