при условии, что у вас есть set
значений с именами data
, ie data ={2.5,2.6,3.2.....}
#create bins using list comprehension
bins = [x/10.0 for x in range(24,37,1)]
>>>bins
[2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6]
# create histogram using matplotlib
from matplotlib import pyplot as plt
plt.hist(data, bins=bins)