class_docstr: Class to compute the empirical null normal fit to the data.
  
  The data which is used to estimate the FDR, assuming a Gaussian null
  from Schwartzmann et al., NeuroImage 44 (2009) 71--82
class_docstr_tok: ["Class","to","compute","the","empirical","null","normal","fit","to","the","data",".","The","data","which","is","used","to","estimate","the","FDR",",","assuming","a","Gaussian","null","from","Schwartzmann","et","al.",",","NeuroImage","44","(","2009",")","71","--","82"]
docstr: Plot the  histogram of x
  
  Parameters
  ------------
  efp : float, optional
      The empirical FDR (corresponding to x)
      if efp==None, the false positive rate threshold plot is not
      drawn.
  alpha : float, optional
      The chosen FDR threshold
  bar=1 : bool, optional
  mpaxes=None: if not None, handle to an axes where the fig
  will be drawn. Avoids creating unnecessarily new figures
docstr_tok: ["Plot","the","histogram","of","x","Parameters","--","--","--","--","--","--","efp",":","float",",","optional","The","empirical","FDR","(","corresponding","to","x",")","if","efp==None",",","the","false","positive","rate","threshold","plot","is","not","drawn",".","alpha",":","float",",","optional","The","chosen","FDR","threshold","bar=1",":","bool",",","optional","mpaxes=None",":","if","not","None",",","handle","to","an","axes","where","the","fig","will","be","drawn",".","Avoids","creating","unnecessarily","new","figures"]
code: def plot(self, efp=None, alpha=0.05, bar=1, mpaxes=None):
      """Plot the  histogram of x
  
      Parameters
      ------------
      efp : float, optional
          The empirical FDR (corresponding to x)
          if efp==None, the false positive rate threshold plot is not
          drawn.
      alpha : float, optional
          The chosen FDR threshold
      bar=1 : bool, optional
      mpaxes=None: if not None, handle to an axes where the fig
      will be drawn. Avoids creating unnecessarily new figures
      """
      if not self.learned:
          self.learn()
      n = np.size(self.x)
      bins = max(10, int(2 * np.exp(np.log(n) / 3.0)))
      hist, ledge = np.histogram(self.x, bins=bins)
      hist = hist.astype("f") / hist.sum()
      step = ledge[1] - ledge[0]
      medge = ledge + 0.5 * step
      import scipy.stats as st
  
      g = self.p0 * st.norm.pdf(medge, self.mu, self.sigma)
      hist /= step
  
      import matplotlib.pyplot as plt
  
      if mpaxes is None:
          plt.figure()
          ax = plt.subplot(1, 1, 1)
      else:
          ax = mpaxes
      if bar:
          # We need to cut ledge to len(hist) to accommodate for pre and
          # post numpy 1.3 hist semantic change.
          ax.bar(ledge[: len(hist)], hist, step)
      else:
          ax.plot(medge[: len(hist)], hist, linewidth=2)
      ax.plot(medge, g, "r", linewidth=2)
      ax.set_title("Robust fit of the histogram", fontsize=12)
      l = ax.legend(("empirical null", "data"), loc=0)
      for t in l.get_texts():
          t.set_fontsize(12)
      ax.set_xticklabels(ax.get_xticks(), fontsize=12)
      ax.set_yticklabels(ax.get_yticks(), fontsize=12)
  
      if efp is not None:
          ax.plot(self.x, np.minimum(alpha, efp), "k")
  
file_path: nipy/nipy/algorithms/statistics/empirical_pvalue.py
imports: import numpy
  import scipy.stats
  from numpy.linalg import pinv
label_desc: Use image node_id 7 for calling the NormalEmpiricalNull obj's underlying member method code with example usage: obj.plot(efp, alpha, bar, mpaxes) without return types