code: def plotMatrix(M, title='matrix', continuous=True, cmap='Greys'):
      
      import matplotlib.pyplot as plt
      import matplotlib as mpl
      from mpl_toolkits.axes_grid1 import make_axes_locatable
      
      M    = numpy.array(M)
      m,n  = numpy.shape(M)
      M    = M.round(decimals=2)
  
      fig  = plt.figure()
      ax   = fig.add_subplot(111)
      cmap = mpl.cm.get_cmap(cmap)
      if not continuous:
          unq  = numpy.unique(M)
      im      = ax.imshow(M, cmap=cmap, interpolation='None')
      divider = make_axes_locatable(ax)
      cax     = divider.append_axes("right", size="5%", pad=0.05)
      dim     = r'$%i \times %i$ ' % (m,n)
      ax.set_title(dim + title)
      ax.axis('off')
      cb = plt.colorbar(im, cax=cax)
      if not continuous:
         cb.set_ticks(unq)
         cb.set_ticklabels(unq)
      plt.show()
docs: Plot a matrix using `matplotlib`.
      
      :Example:
          .. code-block:: python
  
              from vtkplotter.dolfin import plotMatrix
              import numpy as np
              
              M = np.eye(9) + np.random.randn(9,9)/4
              
              plotMatrix(M)
          
          |pmatrix|