sets xtick and xtick labels correctly