コード例 #1
0
ファイル: plot.py プロジェクト: ntejos/Barak
def test_distplot(n=100):
    a = [np.random.randn(n) for i in range(10)]
    x = range(len(a))
    ax = distplot(x, a, showoutliers=1)
    ax = distplot(x, a, color='r')
    ax = distplot(x, a, label='points', color='b', showmean=1)
    ax.legend()
コード例 #2
0
ファイル: plot.py プロジェクト: ninoc/Barak
def test_distplot(n=100):
    a = [np.random.randn(n) for i in range(10)]
    x = range(len(a))
    ax = distplot(x, a, showoutliers=1)
    ax = distplot(x, a, color="r")
    ax = distplot(x, a, label="points", color="b", showmean=1)
    ax.legend()
コード例 #3
0
ファイル: plot_mcmc_old.py プロジェクト: nhmc/LAE
def plot_autocorr(chain):
    """ Plot the autocorrelation of parameters in the chain. This can
    be slow if there are many parameters.
    """
    nwalkers, nsamples, npar = chain.shape
    nrows, ncols = get_nrows_ncols(npar)
    fig,axes = get_fig_axes(nrows, ncols, npar)
    for i,ax in enumerate(axes):
        acor = [autocorr(chain[j,:,i], maxlag=150) for j in xrange(nwalkers)]
        distplot(np.transpose(acor), ax=ax)
        ax.axhline(0, color='r', lw=0.5)
        puttext(0.1, 0.1, P['names'][i], ax, fontsize=16)

    return fig, axes
コード例 #4
0
ファイル: plot_mcmc.py プロジェクト: nhmc/LAE
def plot_autocorr(chain):
    """ Plot the autocorrelation of parameters in the chain. This can
    be slow if there are many parameters.
    """
    nwalkers, nsamples, npar = chain.shape
    nrows, ncols = get_nrows_ncols(npar)
    fig, axes = get_fig_axes(nrows, ncols, npar)
    for i, ax in enumerate(axes):
        acor = [autocorr(chain[j, :, i], maxlag=150) for j in xrange(nwalkers)]
        distplot(np.transpose(acor), ax=ax)
        ax.axhline(0, color='r', lw=0.5)
        puttext(0.1, 0.1, P['names'][i], ax, fontsize=16)

    return fig, axes