added a function to get the axis number based on the axis name