rework the code for axis tick placement