def cdf_points(marginal_hist):
    """
    Generate the points for a CDF of a distribution from its marginal
    histogram.
    """
    cumulative = 0
    total = sum(x[1] for x in marginal_hist)
    points = []
    for (val, count) in marginal_hist:
        cumulative += count
        points.append((val, cumulative / (total + 1)))

    return points