Tick mark exercise

Write an algorithm to compute the tick marks needed to display a data set along an axis.