File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1391,17 +1391,18 @@ def set_fontname(self, fontname):
1391
1391
"""
1392
1392
self .set_fontfamily (fontname )
1393
1393
1394
- def _ha_for_angle (self , angle , is_tick_top_enabled ):
1394
+ def _ha_for_angle (self , angle ):
1395
1395
"""
1396
- Determines horizontal alignment ('ha') based on the angle of rotation
1397
- in degrees. Adjusts for is_tick_top_enabled .
1396
+ Determines horizontal alignment ('ha') for rotation_mode "xtick" based on
1397
+ the angle of rotation in degrees and the vertical alignment .
1398
1398
"""
1399
+ anchor_at_bottom = self .get_verticalalignment () == 'bottom'
1399
1400
if (angle < 5 or 85 <= angle < 105 or 355 <= angle < 360 or
1400
1401
170 <= angle < 190 or 265 <= angle < 275 ):
1401
1402
return 'center'
1402
1403
elif 5 <= angle < 85 or 190 <= angle < 265 :
1403
- return 'left' if is_tick_top_enabled else 'right'
1404
- return 'right' if is_tick_top_enabled else 'left'
1404
+ return 'left' if anchor_at_bottom else 'right'
1405
+ return 'right' if anchor_at_bottom else 'left'
1405
1406
1406
1407
def _va_for_angle (self , angle , is_tick_right_enabled ):
1407
1408
"""
You can’t perform that action at this time.
0 commit comments