10000 Merge pull request #24252 from oscargus/3dlabelrotation · matplotlib/matplotlib@06c1554 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06c1554

Browse files
authored
Merge pull request #24252 from oscargus/3dlabelrotation
Change default rotation mode for 3D labels to 'anchor'
2 parents 2a581c3 + f9f453e commit 06c1554

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,
@@ -402,6 +403,7 @@ def draw(self, renderer):
402403
self.label.set_rotation(angle)
403404
self.label.set_va(info['label']['va'])
404405
self.label.set_ha(info['label']['ha'])
406+
self.label.set_rotation_mode(info['label']['rotation_mode'])
405407
self.label.draw(renderer)
406408

407409
# Draw Offset text

0 commit comments

Comments
 (0)
0