Why is the histogram coordinate scale drawn by matplotlib's hist method not aligned?

from sklearn.datasets import load_iris
import matplotlib.pyplot as plt

iris = load_iris()
s = iris.data[iris.target == 1, 3]
plt.hist(s)
plt.show()

s is of ndarray type. The specific data are as follows:

[1.4 1.5 1.5 1.3 1.5 1.3 1.6 1. 1.3 1.4 1. 1.5 1. 1.4 1.3 1.4 1.5 1.5.
1.5 1.1 1.8 1.3 1.5 1.2 1.2 1.4 1.4 1.47 1.1.1.1 1.26 1.5 1.6
1.51.3 1.3 1.31 .3 1.2 1.4 1.2 1. 1.3 1.2 1.3 1.3 1.1 1.3]

1. There were 7 times, 1.1 3 times, 1.2 5 times, 1.3 13 times, 1.4 5 times, 1.5 10 times, 1.6 3 times, 1.7 and 1.8 each.

the figure drawn is as follows:

Why is it not aligned with the scale? And why is there a gap between 1.3 and 1.4?

May.11,2022

https://stackoverflow.com/que...
plt.hist(s, bins=8)
add a bins parameter

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea750a-1e45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea750a-1e45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?