Implement better mapping from values to ticks