Plot 1D marginalised posteriors for the 'vars' of interest.

def plot_oneD(dataset, vars, filename, bins=60):
    """ Plot 1D marginalised posteriors for the 'vars' of interest."""
    n = len(vars)

    fig, axes = plt.subplots(nrows=n,
                             ncols=1,
                             sharex=False,
                             sharey=False)

    for i, x in enumerate(vars):
        ax = axes[i]
        P = posterior.oneD(dataset+'.h5', x, limits=limits(x), bins=bins)
        P.plot(ax)
        ax.set_xlabel(labels(x))
        ax.set_yticklabels([])

    fig.set_size_inches(4, 4*n)
    fig.savefig(filename, dpi=200, bbox_inches='tight')
    plt.close(fig)