@dmcdougall Allready done.
~~~ python
nstack = np.cumsum(y, axis=0)
m, n = y.shape
center = np.zeros(n)
total = np.sum(y, 0)
increase = np.hstack((y[:, 0:1], np.diff(y)))
below_size = np.vstack((np.zeros((1, n)), 
                        np.cumsum(y[::-1,:][:-1:,:], 0)))[::-1,:] 
below_size += 0.5*y
move_up = below_size / total
move_up[:, 0] = 0.5
center = (move_up - 0.5) * increase
center = np.cumsum(center.sum(0))
first_line = center - 0.5 * total
nstack += first_line
~~~