A robust method for axis identification