i'm having trouble scaling y axis histogram frequencies rather counts (which have now). want go 0 - 1 rather 0 - 10000. because it's histogram, can't divide 10,000. suggestions?
this code & graph
from pyplot.hist
documentation see hist
has argument normed
:
normed
: boolean, optional
if true, first element of return tuple counts normalized form probability density, i.e., n/(len(x)`dbin), i.e., integral of histogram sum 1. if stacked true, sum of histograms normalized 1. default false
you may use normalized histogram.
if instead want counts sum 1, independend of bin width, can divide histogram sum. 2 step process
hist, bins_ = numpy.historgam(results) freq = hist/np.sum(hist) plt.bar(bins_[:-1], freq)
Comments
Post a Comment