[Numpy-discussion] numpy histogram data

Keith Sloan keith at sloan-home.co.uk
Sun Jun 6 11:46:56 EDT 2021

Okay I have some data which I have created a scatter plot

I have also created a histogram of red Galaxy counts for redshift with

counts, bins = np.histogram(RedEllipticalMasses['Z_1'],bins=80)
fig, ax = plt.subplots(1, 1, figsize=(12,8)) # make the figure with the size
10 x 8 inches
fig.suptitle("2 - Histogram Count of Red Galaxies versus Redshift")
plt.hist(bins[:-1], bins, weights=counts)

Is there a way to created the histogram data for a stacked histogram formed
from different ranges of redness 'uminusr'?

Also is there an easy way of extracting the point information for the
midpoints of each histogram column?


Sent from: http://numpy-discussion.10968.n7.nabble.com/

More information about the NumPy-Discussion mailing list