Permalink
Browse files

Merge pull request #1589 from dopplershift/fix_ylabels

Fix shifted ylabels (Issue #1571)
  • Loading branch information...
2 parents 02582f8 + b2a80a7 commit 8ea6241b1615cb24813b8bdfc044d4b0a679a278 @dopplershift dopplershift committed Jan 16, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/matplotlib/axis.py
View
@@ -1887,10 +1887,12 @@ def set_label_position(self, position):
ACCEPTS: [ 'left' | 'right' ]
"""
assert position == 'left' or position == 'right'
- if position == 'right':
- self.label.set_horizontalalignment('left')
+ self.label.set_rotation_mode('anchor')
+ self.label.set_horizontalalignment('center')
+ if position == 'left':
+ self.label.set_verticalalignment('bottom')
else:
- self.label.set_horizontalalignment('right')
+ self.label.set_verticalalignment('top')
self.label_position = position
def _update_label_position(self, bboxes, bboxes2):

0 comments on commit 8ea6241

Please sign in to comment.