'Adjust the direction, text angle, text alignment of
ticklabels, labels following the matplotlib convention for
the rectangle axes.
The *axis_direction* must be one of [left, right, bottom,
top].
property                 left       bottom    right      top
ticklabels location      "-"        "+"       "+"        "-"
axislabel location       "-"        "+"       "+"        "-"
ticklabels angle         90         0         -90        180
ticklabel va             center     baseline  center     baseline
ticklabel ha             right      center    right      center
axislabel angle          180        0         0          180
axislabel va             center     top       center     bottom
axislabel ha             right      center    right      center
Note that the direction "+" and "-" are relative to the direction of
the increasing coordinate. Also, the text angles are actually
relative to (90 + angle of the direction to the ticklabel),
which gives 0 for bottom axis.'

def set_axis_direction(self, axis_direction):

    if (axis_direction not in [u'left', u'right', u'top', u'bottom']):
        raise ValueError(u'direction    must    be    on    of    "left",    "right",    "top",    "bottom"')
    self._axis_direction = axis_direction
    if (axis_direction in [u'left', u'top']):
        self.set_ticklabel_direction(u'-')
        self.set_axislabel_direction(u'-')
    else:
        self.set_ticklabel_direction(u'+')
        self.set_axislabel_direction(u'+')
    self.major_ticklabels.set_axis_direction(axis_direction)
    self.label.set_axis_direction(axis_direction)
