The function represents the nonzero entries in a simple bicolor plot.

display(x, ...)

Arguments

x

matrix of class spam or spam.chol.NgPeyton.

...

any other arguments passed to image.default/plot.

Details

spam.getOption("imagesize") determines if the sparse matrix is coerced into a matrix and the plotted with image.default or if the matrix is simply represented as a scatterplot with pch=".". The points are scaled according to cex*getOption("spam.cex")/(nrow + ncol). For some devices or for non-square matrices, cex needs probably some adjustment.

See also

Author

Reinhard Furrer

Examples

set.seed(13)

smat <- spam_random(8)
par(mfcol=c(1,2), pty='s')
options(spam.imagesize = 1000)
display(smat)
options(spam.imagesize = 10)
display(smat, cex=.25)



# very large but very sparse matrix
smat <- spam_random(2^14, distribution=rnorm, density=1e-5, verbose=TRUE)
#> Density is 0.0000104, specified is 0.00001 (nnz=2798).
par(mfcol=c(1, 1), mai=c(.4,.4,.1,.1), pty='s')
display(smat)
#> Warning: default value for 'cex' in 'display' might not be the optimal choice