calculte Y-axis intervals