def my_hist(ax, l, interval, max_r, color='g', marker='.', fill=False):
    if not l:
        return

    n, p = [], []
    total_len = len(l)
    for i in np.arange(0, max_r, interval):
        xmin, xmax = i - .5 * interval, i + .5 * interval
        nx = [x for x in l if xmin <= xmax < x]
        n.append(i)
        p.append(len(nx) * 100. / total_len)

    if fill:
        from pylab import poly_between

        xs, ys = poly_between(n, 0, p)
        line = ax.fill(xs, ys, fc=color, alpha=.5)

    else:
        line = ax.plot(n, p, color=color, lw=2, ms=3,
                       marker=marker, mfc="w", mec=color, mew=2)

    return line
dataset/ETHPy150Open tanghaibao/jcvi/apps/ks.py/my_hist/swapped operands of `<`