c1<- seq(1,10,0.1)
hist(c1, breaks = 7, right = FALSE, ylim = c(1,10))
why is there always a part that is higher at the edge?
c1<- seq(1,10,0.1)
hist(c1, breaks = 7, right = FALSE, ylim = c(1,10))
why is there always a part that is higher at the edge?
Copyright © 2021 Jogjafile Inc.
It's because there are 11 values in
c1that are between 9.0 and 10.0 (both inclusive). For each other bin, for example, [1, 2) there are only 10 values, as the upper edge belongs to the next bin. But for the last bin, the upper edge (10.0) is included.If you only run your sequence until 9.9, you get the desired histogram