plotBM                 package:Ringo                 R Documentation

_V_i_s_u_a_l_i_z_a_t_i_o_n _o_f _a _b_i_n_a_r_y _m_a_t_r_i_x

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

     This function produces simple, heatmap-like visualizations of
     binary matrices.

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

     plotBM(x, boxCol = "darkblue", reorder = FALSE, frame = TRUE, ...)

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

       x: Binary matrix to visualize

  boxCol: Color to use for boxes of '1's

 reorder: logical; states whether the rows shall be reordered according
          to the size of the category

   frame: logical; states whether a frame should be drawn around the
          visualization. In contrast to the frame drawn in
          'plot.default', there is no gap between the visualization and
          this frame.

     ...: further arguments passed on to 'plot.default'

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

     For reordering, each row is interpreted as a binary matrix, for
     example a row z=(1,0,0,1) would be interpreted as the binary
     number 1001 = 9 in the decimal system. Rows are then reordered by
     the frequency of each binary number with the rows that correspond
     to the most frequent binary number shown at the top in the
     visualization.

_V_a_l_u_e:

     The function invisibly returns the (reordered) matrix 'x', but its
     mainly called for its side effect of producing the visualization.

_N_o_t_e:

     An alternative way to display such matrices are given by 'heatmap'
     or, the simpler version thereof, 'image'. However, image files
     produced with this functions tend to be very large. This function
     uses 'plot.default' and 'polygon' which results in much smaller
     file sizes and is sufficient for binary matrices.

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

     Joern Toedling

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

     'polygon','colors'

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

       A <- matrix(round(runif(80)), ncol=4, byrow=TRUE)
       dimnames(A)=list(letters[seq(nrow(A))],
                        as.character(as.roman(seq(ncol(A)))))
       show(A)
       plotBM(A, reorder=FALSE)
       plotBM(A, reorder=TRUE)

