'plot the histogram against a reference distribution
Parameters
idx : None or list of integers
List of indices into the Monte Carlo results (columns) that should
be used in the calculation
distpdf : callable
probability density function of reference distribution
bins : integer or array_like
used unchanged for matplotlibs hist call
ax : TODO: not implemented yet
kwds : None or tuple of dicts
extra keyword options to the calls to the matplotlib functions,
first dictionary is for his, second dictionary for plot of the
reference distribution
Returns
None'

def plot_hist(self, idx, distpdf=None, bins=50, ax=None, kwds=None):

    if (kwds is None):
        kwds = ({}, {})
    if (self.mcres.ndim == 2):
        if (not (idx is None)):
            mcres = self.mcres[:, idx]
        else:
            raise ValueError('currently    only    1    statistic    at    a    time')
    else:
        mcres = self.mcres
    lsp = np.linspace(mcres.min(), mcres.max(), 100)
    import matplotlib.pyplot as plt
    fig = plt.figure()
    plt.hist(mcres, bins=bins, normed=True, **kwds[0])
    plt.plot(lsp, distpdf(lsp), 'r', **kwds[1])
