Determines horizontal alignment ('ha') for rotation_mode "xtick" based on the angle of rotation in degrees and the vertical alignment.
(self, angle)
| 1540 | self.set_fontfamily(fontname) |
| 1541 | |
| 1542 | def _ha_for_angle(self, angle): |
| 1543 | """ |
| 1544 | Determines horizontal alignment ('ha') for rotation_mode "xtick" based on |
| 1545 | the angle of rotation in degrees and the vertical alignment. |
| 1546 | """ |
| 1547 | anchor_at_bottom = self.get_verticalalignment() == 'bottom' |
| 1548 | if (angle <= 10 or 85 <= angle <= 95 or 350 <= angle or |
| 1549 | 170 <= angle <= 190 or 265 <= angle <= 275): |
| 1550 | return 'center' |
| 1551 | elif 10 < angle < 85 or 190 < angle < 265: |
| 1552 | return 'left' if anchor_at_bottom else 'right' |
| 1553 | return 'right' if anchor_at_bottom else 'left' |
| 1554 | |
| 1555 | def _va_for_angle(self, angle): |
| 1556 | """ |