Setting text anchor for axis tick labels based on all possible rotations.