def getLivenessPoints(liveness):
    """
    histogram points for the liveness plot. It will be used for a plot like:

     ^
     |       *
     |   * * *
     |  ** ***
     | *********
     +-------------->
      schedule index.

    
    For example, if the livenesses are [3,5], the points will be,
    [[0,3],[1,3],[1,5],[2,5]]
    
    The points are connected alternatively with horizontal and vertical lines. 
    """
    xs = []
    ys = []
    for op in range(len(liveness)):
        if op == 0:
            xs.append(0)
        else:
            xs.append(xs[-1])

        xs.append(xs[-1] + 1)
        ys.append(liveness[op])
        ys.append(liveness[op])

    assert len(xs) == len(ys)
    assert len(xs) == 2 * len(liveness)

    return xs, ys