Ok thanks i understand all of that but how did they come up with the value 4 in between 0 and 8?

It is just a convenient number. Could have equally used 2 or 3 or 5. An integer is convenient. You will find for other plots that sometimes non integer values are useful, e.g. where a line crosses an axis.