def print_histogram(probs, counts):
    WIDTH = 60.0
    max_count = max(counts)
    print '{: >8} {: >8}'.format('Prob', 'Count')
    for prob, count in sorted(zip(probs, counts), reverse=True):
        width = int(round(WIDTH * count / max_count))
        print '{: >8.3f} {: >8d} {}'.format(prob, count, '-' * width)