class_docstr: This is a container for a light-weight class for design matrices
  
  This class is only used to make IO and visualization.
  
  Attributes
  ----------
  matrix: array of shape (n_scans, n_regressors)
      the numerical specification of the matrix.
  names: list of len (n_regressors)
      the names associated with the columns.
  frametimes: array of shape (n_scans), optional
      the occurrence time of the matrix rows.
class_docstr_tok: ["This","is","a","container","for","a","light-weight","class","for","design","matrices","This","class","is","only","used","to","make","IO","and","visualization",".","Attributes","--","--","--","--","--","matrix",":","array","of","shape","(","n_scans",",","n_regressors",")","the","numerical","specification","of","the","matrix",".","names",":","list","of","len","(","n_regressors",")","the","names","associated","with","the","columns",".","frametimes",":","array","of","shape","(","n_scans",")",",","optional","the","occurrence","time","of","the","matrix","rows","."]
docstr: Visualization of a design matrix
  
  Parameters
  ----------
  rescale: bool, optional
           rescale columns magnitude for visualization or not.
  ax: axis handle, optional
      Handle to axis onto which we will draw design matrix.
  cmap: colormap, optional
      Matplotlib colormap to use, passed to `imshow`.
  
  Returns
  -------
  ax: axis handle
docstr_tok: ["Visualization","of","a","design","matrix","Parameters","--","--","--","--","--","rescale",":","bool",",","optional","rescale","columns","magnitude","for","visualization","or","not",".","ax",":","axis","handle",",","optional","Handle","to","axis","onto","which","we","will","draw","design","matrix",".","cmap",":","colormap",",","optional","Matplotlib","colormap","to","use",",","passed","to","`","imshow","`",".","Returns","--","--","--","-","ax",":","axis","handle"]
code: def show(self, rescale=True, ax=None, cmap=None):
      """Visualization of a design matrix
  
      Parameters
      ----------
      rescale: bool, optional
               rescale columns magnitude for visualization or not.
      ax: axis handle, optional
          Handle to axis onto which we will draw design matrix.
      cmap: colormap, optional
          Matplotlib colormap to use, passed to `imshow`.
  
      Returns
      -------
      ax: axis handle
      """
      import matplotlib.pyplot as plt
  
      # normalize the values per column for better visualization
      x = self.matrix.copy()
      if rescale:
          x = x / np.sqrt(np.sum(x**2, 0))
      if ax is None:
          plt.figure()
          ax = plt.subplot(1, 1, 1)
  
      ax.imshow(x, interpolation="Nearest", aspect="auto", cmap=cmap)
      ax.set_label("conditions")
      ax.set_ylabel("scan number")
  
      if self.names is not None:
          ax.set_xticks(list(range(len(self.names))))
          ax.set_xticklabels(self.names, rotation=60, ha="right")
      return ax
  
file_path: nipy/nipy/modalities/fmri/design_matrix.py
imports: from warnings import warn
  import numpy
  from .hemodynamic_models import _orthogonalize, compute_regressor
label_desc: Use image node_id 3 for calling the DesignMatrix obj's underlying member method code with example usage: obj.show(rescale, ax, cmap) and returns: ax