def get_axis(self, attr_name):
    """ Getter function used by AxisProperty.
    """
    if (attr_name, self.orientation
        ) in [("index_axis", "h"), ("value_axis", "v")]:
        return self.x_axis
    else:
        return self.y_axis