Unable to understand the jump used in arange function

Screen Link:

My Code:

from numpy import arange
wnba['PTS'].plot.hist(grid = True, xticks = arange(2,585,58.2), rot = 30)

In the above code (which is mentioned in link above) on what basis we got or how we calculated the value of 58.2 in arrange function?

->arange(2,585,58.2)

It’s the difference between the beginning and endpoint of the number intervals, we got from previous code snippet

print(wnba['PTS'].value_counts(bins = 10).sort_index())
(1.417, 60.2]     30
(60.2, 118.4]     24
(118.4, 176.6]    17
(176.6, 234.8]    20
(234.8, 293.0]    17
(293.0, 351.2]     8
(351.2, 409.4]    10
(409.4, 467.6]     8
(467.6, 525.8]     4
(525.8, 584.0]     5
Name: PTS, dtype: int64

which is

584.0 - 525.8 = 58.2
525.8 - 467.6 = 58.2

Hope its clear now?

1 Like