I have run numpy.histogram()
on a bunch of subsets of a larger datasets. I want to separate the calculations from the graphical output, so I would prefer not to call matplotlib.pyplot.hist()
on the data itself.
In principle, both of these functions take the same inputs: the raw data itself, before binning. The numpy
version just returns the nbin+1
bin edges and nbin
frequencies, whereas the matplotlib
version goes on to make the plot itself.
So is there an easy way to generate the histograms from the numpy.histogram()
output itself, without redoing the calculations (and having to save the inputs)?
To be clear, the numpy.histogram()
output is a list of nbin+1
bin edges of nbin
bins; there is no matplotlib
routine which takes those as input.