I have this data:
[-152, -132, -132, -128, -122, -121, -120, -113, -112, -108,
-107, -107, -106, -106, -106, -105, -101, -101, -99, -89, -87,
-86, -83, -83, -80, -80, -79, -74, -74, -74, -71, -71, -69,
-67, -67, -65, -62, -61, -60, -60, -59, -55, -54, -54, -52,
-50, -49, -48, -48, -47, -44, -43, -38, -37, -35, -34, -34,
-29, -27, -27, -26, -24, -24, -19, -19, -19, -19, -18, -16,
-16, -16, -15, -14, -14, -12, -12, -12, -4, -1, 0, 0, 1, 2, 7,
14, 14, 14, 14, 18, 18, 19, 24, 29, 29, 41, 45, 51, 72, 150, 155]
I wanna plot it by using a histogram with these bins:
[-160,-110,-90,-70,-40,-10,20,50,80,160]
I've used this code for that:
import matplotlib.pyplot as plt
...
plt.hist(data, bins)
plt.show()
But the problem with this plot is that bars height is not according to bins width, because frequency should symbolize the area of a bar (see this page). So how could I plot this type of histogram? Thanks in advance.