diff --git a/lib/matplotlib/text.py b/lib/matplotlib/text.py index 82a302c269ed..2a3c02a17af2 100644 --- a/lib/matplotlib/text.py +++ b/lib/matplotlib/text.py @@ -163,8 +163,8 @@ def __init__(self, self.set_color(color) self.set_usetex(usetex) self.set_wrap(wrap) - self._verticalalignment = verticalalignment - self._horizontalalignment = horizontalalignment + self.set_verticalalignment(verticalalignment) + self.set_horizontalalignment(horizontalalignment) self._multialignment = multialignment self._rotation = rotation self._fontproperties = fontproperties @@ -1147,9 +1147,10 @@ def set_verticalalignment(self, align): """ Set the vertical alignment - ACCEPTS: [ 'center' | 'top' | 'bottom' | 'baseline' ] + ACCEPTS: [ 'center' | 'top' | 'bottom' | 'baseline' | + 'center_baseline' ] """ - legal = ('top', 'bottom', 'center', 'baseline') + legal = ('top', 'bottom', 'center', 'baseline', 'center_baseline') if align not in legal: raise ValueError('Vertical alignment must be one of %s' % str(legal))