
Мой код довольно прост:
Код: Выделить всё
histogram, _ = numpy.histogram(data, bins=256, range=(0,255))
seaborn.histplot(histogram, bins=256, kde=True)
plt.title('Histogram - ')
plt.xlabel('Values')
plt.ylabel('Frequency')
Код: Выделить всё
array = [random.randint(0,255) for _ in range(1000000)]
array = numpy.array(array)
hist, _ = numpy.histogram(array, bins=256, range=(0,255))
seaborn.histplot(hist, bins=256, kde=True)
Подробнее здесь: https://stackoverflow.com/questions/791 ... matplotlib