I'm trying to figure out how to plot the peaks of a simple histogram using scipy.signal.find_peaks but the peaks found seem way off.
ages = np.array([10, 5, 22, 13, 50, 45, 67, 30, 21, 34, 60, 67, 89, 45, 45, 65])
hist, bin_edges = np.histogram(ages, 10)
bin_edges = bin_edges[1:]
plt.plot(bin_edges, hist)
peaks, _ = find_peaks(hist)
plt.plot(ages[peaks], peaks, "x")
