display                 package:spam                 R Documentation

_G_r_a_p_h_i_a_l_l_y _r_e_p_r_e_s_e_n_t _t_h_e _n_o_n_z_e_r_o _e_n_t_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

       display(x, ...)

_A_r_g_u_m_e_n_t_s:

       x: matrix of class 'spam' or 'spam.chol.NgPeyton'.

     ...: any other arguments passed to 'image.default'/'plot'.

_D_e_t_a_i_l_s:

     '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*spam.getOption('cex')/(nrow+ncol)'. For some devices or for
     non-square matrices, 'cex' needs probably some adjustment.

_A_u_t_h_o_r(_s):

     Reinhard Furrer

_S_e_e _A_l_s_o:

     'image', 'spam.options'

_E_x_a_m_p_l_e_s:

     set.seed(13)

     nz <- 8
     ln <- nz
     smat <- spam(0,ln,ln)
     smat[cbind(sample(ln,nz),sample(ln,nz))] <- 1:nz

     par(mfcol=c(1,2),pty='s')
     spam.options( imagesize=1000)
     display(smat)
     spam.options( imagesize=10)
     display(smat)

     # very large but very sparse matrix
     nz <- 128
     ln <- nz^2
     smat <- spam(0,ln,ln)
     smat[cbind(sample(ln,nz),sample(ln,nz))] <- 1:nz

     par(mfcol=c(1,1),pty='s')
     display(smat, cex=100)

