code: def plot_covariance(self, corr=False, param_slice=None, tick_labels=None, tick_params=None):
          
          if mpls is None:
              raise ImportError("Hinton diagrams require mpltools.")
  
          if param_slice is None:
              param_slice = np.s_[:]
  
          tick_labels = (
              list(range(len(self.model.modelparam_names[param_slice]))),
              tick_labels
              if tick_labels is not None else
              list(map(u"${}$".format, self.model.modelparam_names[param_slice]))
          )
  
          cov = self.est_covariance_mtx(corr=corr)[param_slice, param_slice]
  
          retval = mpls.hinton(cov)
          plt.xticks(*tick_labels, **(tick_params if tick_params is not None else {}))
          plt.yticks(*tick_labels, **(tick_params if tick_params is not None else {}))
          plt.gca().xaxis.tick_top()
  
          return retval
docs: Plots the covariance matrix of the posterior as a Hinton diagram.
  
          .. note::
  
              This function requires that mpltools is installed.
  
          :param bool corr: If `True`, the covariance matrix is first normalized
              by the outer product of the square root diagonal of the covariance matrix
              such that the correlation matrix is plotted instead.
          :param slice param_slice: Slice of the modelparameters to
              be plotted.
          :param list tick_labels: List of tick labels for each component;
              by default, these are drawn from the model itself.