'Adjust the text angle and text alignment of axis label
according to the matplotlib convention.
property                 left       bottom    right      top
axislabel angle          180        0         0          180
axislabel va             center     top       center     bottom
axislabel ha             right      center    right      center
Note that 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, d):

    if (d not in [u'left', u'right', u'top', u'bottom']):
        raise ValueError(u'direction    must    be    on    of    "left",    "right",    "top",    "bottom"')
    self.set_default_alignment(d)
    self.set_default_angle(d)
