I think you are looking for the following:
Essentially plt.hist() outputs two arrays (and, as Nordev pointed out, some patches). The first is the counter in each hopper ( n ), and the second is the edges of the hopper.
import matplotlib.pylab as plt import numpy as np

This is the best I can come up with without any more detailed description of the problem. Sorry if I misunderstood.
source share