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.
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
axis.
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
axis.
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.
# 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")
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MLEcens)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MLEcens/plotCM.rd_%03d_medium.png", width=480, height=480)
> ### Name: plotCM
> ### Title: Plot a clique matrix
> ### Aliases: plotCM
> ### Keywords: hplot
>
> ### ** Examples
>
> # 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")
>
>
>
>
>
> dev.off()
null device
1
>