Skip to content

Commit f9f453e

Browse files
committed
Change rotation mode for 3D labels to 'anchor'
1 parent f15aeee commit f9f453e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mpl_toolkits/mplot3d/axis3d.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def __init__(self, *args, **kwargs):
9696
self._axinfo = self._AXINFO[name].copy()
9797
# Common parts
9898
self._axinfo.update({
99-
'label': {'va': 'center', 'ha': 'center'},
99+
'label': {'va': 'center', 'ha': 'center',
100+
'rotation_mode': 'anchor'},
100101
'color': mpl.rcParams[f'axes3d.{name}axis.panecolor'],
101102
'tick': {
102103
'inward_factor': 0.2,
@@ -403,6 +404,7 @@ def draw(self, renderer):
403404
self.label.set_rotation(angle)
404405
self.label.set_va(info['label']['va'])
405406
self.label.set_ha(info['label']['ha'])
407+
self.label.set_rotation_mode(info['label']['rotation_mode'])
406408
self.label.draw(renderer)
407409

408410
# Draw Offset text

0 commit comments

Comments
 (0)