@@ -75,6 +75,7 @@ def __init__(
75
75
label2On = False ,
76
76
major = True ,
77
77
labelrotation = 0 ,
78
+ labelrotation_mode = None ,
78
79
grid_color = None ,
79
80
grid_linestyle = None ,
80
81
grid_linewidth = None ,
@@ -157,11 +158,13 @@ def __init__(
157
158
self .label1 = mtext .Text (
158
159
np .nan , np .nan ,
159
160
fontsize = labelsize , color = labelcolor , visible = label1On ,
160
- fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ])
161
+ fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ],
162
+ rotation_mode = labelrotation_mode )
161
163
self .label2 = mtext .Text (
162
164
np .nan , np .nan ,
163
165
fontsize = labelsize , color = labelcolor , visible = label2On ,
164
- fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ])
166
+ fontfamily = labelfontfamily , rotation = self ._labelrotation [1 ],
167
+ rotation_mode = labelrotation_mode )
165
168
166
169
self ._apply_tickdir (tickdir )
167
170
@@ -321,7 +324,8 @@ def _apply_params(self, **kwargs):
321
324
self .label2 .set (rotation = self ._labelrotation [1 ])
322
325
323
326
label_kw = {k [5 :]: v for k , v in kwargs .items ()
324
- if k in ['labelsize' , 'labelcolor' , 'labelfontfamily' ]}
327
+ if k in ['labelsize' , 'labelcolor' , 'labelfontfamily' ,
328
+ 'labelrotation_mode' ]}
325
329
self .label1 .set (** label_kw )
326
330
self .label2 .set (** label_kw )
327
331
@@ -1050,14 +1054,15 @@ def _translate_tick_params(cls, kw, reverse=False):
1050
1054
'tick1On' , 'tick2On' , 'label1On' , 'label2On' ,
1051
1055
'length' , 'direction' , 'left' , 'bottom' , 'right' , 'top' ,
1052
1056
'labelleft' , 'labelbottom' , 'labelright' , 'labeltop' ,
1053
- 'labelrotation' , 'rotation_mode ' ,
1057
+ 'labelrotation' , 'labelrotation_mode ' ,
1054
1058
* _gridline_param_names ]
1055
1059
1056
1060
keymap = {
1057
1061
# tick_params key -> axis key
1058
1062
'length' : 'size' ,
1059
1063
'direction' : 'tickdir' ,
1060
1064
'rotation' : 'labelrotation' ,
1065
+ 'rotation_mode' : 'labelrotation_mode' ,
1061
1066
'left' : 'tick1On' ,
1062
1067
'bottom' : 'tick1On' ,
1063
1068
'right' : 'tick2On' ,
0 commit comments